From: Doug M. <do...@cr...> - 2001-02-21 21:17:01
|
> > "Note that delete affects only property values, not objects > > referred to by those > > properties" > > > >From this can we establish that we cannot rely on delete to > > free memory reliably ??? > > Does this also mean that we'd have to iterate through > > sub-objects deleting them? Perhaps > > some kind of destroy() method ??? > > hmm, it would then be possible to atleast delete all objects created within > the DynLayer (simple for loop can be used) problematic thing are all > objects with objects them selves.. > > the deletefromparent method could do this for us, take care of deletion of > all objects referred to. I'll see if I can come up with anything.. and if it > actually frees any memory at all. a recursive funtion maybe? 'psudo code' function delete_children(obj){ for each child in obj.children[] { delete_children(child) } delete obj } this would delete all children of all children of all children.. ect --- Outgoing mail is certified Virus Free by AVG Free Edition Download at: http://www.grisoft.com/html/us_index.cfm Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.231 / Virus Database: 112 - Release Date: 2/12/01 |