diff --git a/ChangeLog b/ChangeLog index 629bece71..22459664b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2011-03-07 Fred Kiefer + + * Source/NSGraphicsContext.m (+saveGraphicsState): Release the + stack, as it is retained in the thread dictionary. + Leak found by static code analyser. + 2011-03-07 Fred Kiefer * gui/Headers/Additions/GNUstepGUI/GSDisplayServer.h diff --git a/Source/NSGraphicsContext.m b/Source/NSGraphicsContext.m index ded6e76c9..8504f9022 100644 --- a/Source/NSGraphicsContext.m +++ b/Source/NSGraphicsContext.m @@ -262,6 +262,7 @@ NSGraphicsContext *GSCurrentContext(void) { stack = [[NSMutableArray allocWithZone: _globalGSZone] init]; [dict setObject: stack forKey: NSGraphicsContextStackKey]; + RELEASE(stack); } // might be nil, i.e. no current context ctxt = GSCurrentContext();