([NSMutableParagraphStyle -copyWithZone:]): Call GSDebugAllocation* when swizzling the class.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@15966 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Alexander Malmberg 2003-02-15 17:15:50 +00:00
parent d59dd69fca
commit 0b0e77ad82
2 changed files with 13 additions and 0 deletions

View file

@ -1,3 +1,10 @@
2003-02-15 18:11 Alexander Malmberg <alexander@malmberg.org>
* Source/NSParagraphStyle.m ([NSMutableParagraphStyle
-copyWithZone:]): Add calls to GSDebugAllocationAdd/
GSDebugAllocationRemove when swizzling the class to keep the
allocation counts valid.
2003-02-15 18:04 Alexander Malmberg <alexander@malmberg.org>
* Source/NSSpellChecker.m (-_launchSpellCheckerForLanguage:): Don't

View file

@ -26,6 +26,10 @@
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* To keep the allocation counts valid when swizzling the class in
[NSMutableParagraphStyle -copyWithZone:]. */
#include <Foundation/NSDebug.h>
#include <Foundation/NSException.h>
#include <AppKit/NSParagraphStyle.h>
@ -479,7 +483,9 @@ static NSParagraphStyle *defaultStyle = nil;
NSMutableParagraphStyle *c;
c = (NSMutableParagraphStyle*)NSCopyObject (self, 0, aZone);
GSDebugAllocationRemove(c->isa, c);
c->isa = [NSParagraphStyle class];
GSDebugAllocationAdd(c->isa, c);
c->_tabStops = [_tabStops mutableCopyWithZone: aZone];
return c;
}