Fred Kiefer wrote: > The other change is more interesting. Did you switch of the memory > management for NIB connections because of the ugly memory problems this > is causing on applications like Bean? We have noticed this during our > session in Bergamo as well. My impression there was that outlets set via > the NIB connection mechanism get deallocated behind the back of the > application. We didn't have the time to investigate this in detail. My > first idea was the perhaps the mechanism we use to set the outlets > doesn't follow the documented memory management rules, but as far as I > can tell this wasn't the case. I think we are using GSObjCFindVariable() > and GSObjCSetVariable() and these should work correctly. Perhaps we > could switch to setValue:forKey: here to have a more general mechanism > in place. But basically this would end up calling the same code, it is > just a bit cleaner and easier to understand. >
Looks like today is the day of replying to my own mails :-) I looked at that code a bit deeper and there is indeed a difference between setValue:forKey: and the current code that establish outlet connections. From there we call GSObjCSetVariable() while KVC uses GSObjCSetVal() and the later uses ASSIGN() to set instance variable which are objects. This should explain the problem we are getting with NIB loading, we are not retaining any ivars that get set directly via outlets. I am going to change the code in NSNibOutletConnector and we should then proceed to clean up the missing release calls in GSNibLoading.m. For the few places where retaining the ivar is wrong we now will need to add internal methods that set the ivar without retain. Fred _______________________________________________ Gnustep-dev mailing list Gnustep-dev@gnu.org http://lists.gnu.org/mailman/listinfo/gnustep-dev