Am 19.03.2010 09:20, schrieb Fred Kiefer:
My current position on NIB loading is that no magic should happen
there.
Objects created while loading a NIB file should follow the standard
rules. Nothing will be retained except for the top level objects
being
retained in the top level object array. (And of course
instantiated and
visible windows by the normal window display mechanism)
That way anything that is not retained by the owner or specifically
extracted from the top level object array will be freed after loading
the NIB file when no other reference exists.
If we can all agree on this position (and better yet, check that
it is
valid on Cocoa), I am going to change our code into this direction.
This may require some extra handling in NSWindowController or
NSDocument.
Wolfgang was right, the problem in Bean was not relate to NIB
loading at
all. This issue should be resolved (or at least worked around), by the
change I made to NSDocument last night.
The problem with NIB loading was rather that we retained too much. I
tried to resolve this by adding proper releasing of the real object to
many of the NIB loading helper classes and correcting the top level
object handling there as well. This is only the beginning of more
clean
up, but should resolve most of the known issues.