Connection Requests and unused model deletion [message #166420] |
Mon, 31 January 2005 21:52  |
Eclipse User |
|
|
|
Originally posted by: Lamont_Gilbert.rigidsoftware.com
I have Connections in my program and they follow the GEF design in
general. The problem is that GEF will, when the ConnectionCommand is
created, create a new connection model. That model will hang around
until the command is actually used/executed. Then any subsequent
connection command will cause a new connection model to be created.
I have a database application and I need the opportunity to clean up
these unused created connection models. but I done see any dispose
being called on the Requests, or the Factory that created the model.
How / when would you recommend I collect these unused connection models
and remove them from the database?
i would only create the model inside the command, but the connection
editing process makes that difficult, but not impossible though.
thanks for your tips.
CL
|
|
|
|
Re: Connection Requests and unused model deletion [message #166513 is a reply to message #166436] |
Tue, 01 February 2005 08:15  |
Eclipse User |
|
|
|
Originally posted by: Lamont_Gilbert.rigidsoftware.com
well i hadn't looked at the shapes example. usually the model has been
created with request.getNewObject() when the command was created. And
thus it is cached within the Request until it is actually used. Somehow
the request knows when its used and clears it out. So I guess i can
stop using request.getNewObject when the command is created and pass the
request into the command and call it there.
i hope it works and the request knows still to get rid of the created
model, or the request itself gets dumped. not sure how this happens.
Pratik Shah wrote:
> It's not entirely clear to me what the problem is. The client is
> responsible for providing the Command that is going to create the
> connection, and hence has complete control over it. You don't have to
> create a new connection model everytime a Command is created. Rather, you
> should do that when the command is executed, for then you know that it is a
> connection that is needed. The Shapes example works this way.
>
> "CL [dnoyeb] Gilbert" <Lamont_Gilbert@rigidsoftware.com> wrote in message
> news:ctmqu0$9hd$1@www.eclipse.org...
>
>>I have Connections in my program and they follow the GEF design in
>>general. The problem is that GEF will, when the ConnectionCommand is
>>created, create a new connection model. That model will hang around
>>until the command is actually used/executed. Then any subsequent
>>connection command will cause a new connection model to be created.
>>
>>I have a database application and I need the opportunity to clean up
>>these unused created connection models. but I done see any dispose
>>being called on the Requests, or the Factory that created the model.
>>
>>How / when would you recommend I collect these unused connection models
>>and remove them from the database?
>>
>>i would only create the model inside the command, but the connection
>>editing process makes that difficult, but not impossible though.
>>
>>
>>
>>thanks for your tips.
>>
>>CL
>
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.02999 seconds