More tweaks for garbage collection mode, including making NSNotificationCenter use weak pointers (things are never removed if it uses strong pointers because they remove themselves in the -dealloc method, which is never called, and can't remove themselves in the -finalize method because the -finalize method would not be called until after they have been removed - this is consistent with Apple behaviour).

Gorm now works correctly when built with GC enabled.



git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33109 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
David Chisnall 2011-05-25 11:15:08 +00:00
parent a439972605
commit b08b2d0f34
7 changed files with 20 additions and 26 deletions

View file

@ -142,7 +142,7 @@ struct NCTbl; /* Notification Center Table structure */
*/
typedef struct Obs {
id observer; /* Object to receive message. */
__weak id observer; /* Object to receive message. */
SEL selector; /* Method selector. */
IMP method; /* Method implementation. */
struct Obs *next; /* Next item in linked list. */