mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 09:04:13 +00:00
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:
parent
db4b3a3440
commit
b9ed7d103d
1 changed files with 4 additions and 4 deletions
|
@ -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];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue