[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: garbage collection?



On Tue, 10 Apr 2001, Reason wrote:
> You can make very complex interrelationships between objects, you just have
> to make the low-level code that manages the objects a little different.
> Persistent Ozone objects hang around until you database().destroy() them.
> So, to take a trivial example, if you have multiple objects of class X that
> contain references to a single object of class Y, you need to change the
> behavior of X.removeReferenceToY() (or vice versa) such that the Y object is
> destroy()ed if it doesn't have any references left.
> 
> Removing references on deletion is pretty easy -- just use the onDelete()
> method liberally.
> 
> [I can't see any reason as to why you couldn't start up an object removal
> thread in a persistant object in the database server as well, but that may
> be costly compared to just deleting where appropriate in you low-level
> code].
> 
> Have a look at www.twilightminds.com/datafull.html for an example of complex
> interrelationships (based on simple rules and three classes) handled in an
> Ozone environment.

I agree. Explicitly handling deletion of object in a application specific
manner is not that hard to achieve in the majority of cases _and_ is much
faster than a generic GC. Anyway, Jerry, a generic GC for sure would be a
great enhancement of ozone. If you need it then it would be great if you would
help to come up with a solution.


Falko

> 
> Reason
> http://www.exratio.com/
> 
> ----- Original Message -----
> From: "Jerry Seeger" <vikingjs@mac.com>
> To: <ozone-users@ozone-db.org>
> Sent: Monday, April 09, 2001 7:01 PM
> Subject: garbage collection?
> 
> 
> > Does ozone do garbage collection? I have objects that may be parts of
> > several different collections and I sure don't want to have to keep
> > track of the number of references to each one to know when to remove it
> > from the database. This could be a deal breaker for me - the whole
> > reason I want to use an OODBMS is so I can have very complex
> > interrelationships and treat them just like regular Java code.
> >
> > Jerry Seeger
-- 
______________________________________________________________________
Falko Braeutigam                              mailto:falko@smb-tec.com
SMB GmbH                                        http://www.smb-tec.com