discuss-gnustep
[Top][All Lists]
Advanced

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

Re: Renaissance tutorial


From: David Ayers
Subject: Re: Renaissance tutorial
Date: Sat, 04 Jan 2003 14:28:38 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2) Gecko/20021126

Nicola Pero wrote:

I appreciate comments and suggestions (and bug reports) as usual. :-)

Hello Nicola,

Great job! This seems to be exactly the nib replacement I've been hoping for! I haven't tried it yet, but a quick glance at the tutorial and short scan of the source revealed that one of my itches about nib files wasn't scratched with Renaissance though. It has to to with memory management. Nibs simply leak (yes, you can partially avoid it by connecting (or programmatically collecting) all objects you can programmatically reference and send an extra release during the owners dealloc, yet some of the internal nib-collection objects always remain, though they don't use a lot of memory. In large projects (200+ bundles) this can be very annoying and error prone.

I'm not 100% sure if Renaissance doesn't addresses this issue, but if not, I would suggest that during loadGSMarkupNamed:owner: the owner could be asked if it implemented a method like -(void)takeOwnershipOfObjectGraph:(id)rootObject (or anything similar) and if so invoke it and (auto)release the rootObject. That way the owner can take control of object graph and release it when apropriate. Maybe some extra code in the rootObjects dealloc would also be needed to break any cyclic references in the graph objects, but that would be a second step.

What do you think?

Cheers,
Dave







reply via email to

[Prev in Thread] Current Thread [Next in Thread]