From 7f01cf875331fd44c44c553c0fe88848ab730cce Mon Sep 17 00:00:00 2001 From: richard Date: Tue, 20 Oct 1998 08:50:52 +0000 Subject: [PATCH] Fix so that NXConstantStrings are encodes as NSGCStrings, avoiding memory leaks when restoring from archive. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@3085 72102866-910b-0410-8b05-ffd578937521 --- Source/NSGCString.m | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Source/NSGCString.m b/Source/NSGCString.m index 4b033984b..15701c4f7 100644 --- a/Source/NSGCString.m +++ b/Source/NSGCString.m @@ -708,11 +708,11 @@ stringDecrementCountAndFillHoleAt(NSGMutableCStringStruct *self, /* * NXConstantString overrides [-dealloc] so that it is never deallocated. - * If we pass an NXConstantString to another process it will never get - * deallocated in the other process - causing a memory leak. So we tell - * the DO system to use the super class instead. + * If we pass an NXConstantString to another process or record it in an + * archive and readi it back, the new copy will never be deallocated - + * causing a memory leak. So we tell the system to use the super class. */ -- (Class)classForPortCoder +- (Class)classForCoder { return [self superclass]; }