mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 08:21:25 +00:00
Add code to make allocation error tracking easier for Nikolaus Schaller
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@37327 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
00963be77a
commit
fda6ac643b
3 changed files with 48 additions and 14 deletions
|
@ -543,3 +543,24 @@ static SEL objSel;
|
|||
}
|
||||
@end
|
||||
|
||||
@interface GSCachedDictionary : GSDictionary
|
||||
{
|
||||
BOOL _uncached;
|
||||
}
|
||||
@end
|
||||
@implementation GSCachedDictionary
|
||||
- (void) dealloc
|
||||
{
|
||||
if (NO == _uncached)
|
||||
{
|
||||
[NSException raise: NSInternalInconsistencyException
|
||||
format: @"Deallocating attributes which are still cached"];
|
||||
}
|
||||
[super dealloc];
|
||||
}
|
||||
- (void) _uncache
|
||||
{
|
||||
_uncached = YES;
|
||||
RELEASE(self);
|
||||
}
|
||||
@end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue