[DGD]Light-weight objects...

Erwin Harte harte at xs4all.nl
Fri Jun 22 18:07:09 CEST 2001


On Fri, Jun 22, 2001 at 11:59:58AM -0500, Thomas Annandale wrote:
> I don't understand what's to keep me from replacing every single instance
> of clone_object with new_object.  As far as I can see, lightweight objects
> are exactly the same as normal objects except, as you say, they take up
> less space and are automatically garbage collected.  Why WOULDN'T you use
> them whenever possible?  There has to be some kind of drawback, or
> something that you can't do with a lightweight object.  What is it?

- You can't use call_out()s
- If you destruct the base off of which the LWOs are new_object()'d,
  all of them disappear.
- You don't have explicit control over when a LWO stops to exist, it's
  picked up by garbage-collection.

I think there may be more, but those are the ones I remember. :-)

Erwin.
-- 
Erwin Harte <harte at xs4all.nl>

List config page:  http://list.imaginary.com/mailman/listinfo/dgd



More information about the DGD mailing list