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
This commit is contained in:
Richard Frith-MacDonald 1998-10-20 08:50:52 +00:00
parent db4b3a3440
commit b9ed7d103d

View file

@ -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];
}