Path: news.daimi.aau.dk!news.uni-c.dk!sunic!sunic.sunet.se!news.luth.se!eru.mt.luth.se!bloom-beacon.mit.edu!gatech!howland.reston.ans.net!EU.net!Austria.EU.net!newsfeed.ACO.net!aci.cvut.cz!risc.upol.cz!decsys.vsb.cz!newsmast From: Marek Novy Newsgroups: comp.lang.beta Subject: Re: Part objects Date: 24 Apr 1995 09:12:23 GMT Organization: Technical University of Ostrava, Czech Republic Lines: 35 Message-ID: <3nfq1n$gjl@decsys.vsb.cz> References: <9504201034.ZM19488@ody.zcu.cz> <3n7ltl$h44@engnews2.Eng.Sun.COM> NNTP-Posting-Host: odysseus.zcu.cz Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 1.1b2 (X11; I; IRIX 5.3 IP20) X-URL: news:3n7ltl$h44@engnews2.Eng.Sun.COM olm@Eng.Sun.COM (Ole Lehrmann Madsen) wrote: >It is correct that a part-object may be exist as in the above example. >The enclosing 'strange'-object will, however, also exist since there >is a reference to the part-object. > >As you have a reference to a part of an object, the whole object >continues to exists. > >Why do you find this non-ok from a theoretical point of view. So object will exist if some other object refers to it or its part-object. This is certainly OK. It's very liberal point of view. I prefer more aggressive, more physical and hopefully more effective solution: Every object must be owned by an enclosing one. The object will exist if enclosing one exists. References to this object will be invalidated (null ref.) after its 'death'. This solution doesn't necessary get off the garbage collector. The objects without a clear owner could be owned by a 'garbage-collector' object. The GC will delete the object if it doesn't find any reference to it as usual. Yours, Marek Novy, University of West Bohemia ******************************************************************** Look at BatOS, revolution in OS design http://odysseus.zcu.cz/~novy1 ********************************************************************