diff --git a/ChangeLog b/ChangeLog index 950c6461d..4912df47f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2002-05-13 Georg Fleischmann + + * gui/Source/NSPrintOperation.m + [NSPrintOperation(GSEPSPrintOperation) -createContext:]: + add local autorelease pool to remove autorelease of context. + 2002-05-13 Fred Kiefer * Source/NSColor.m diff --git a/Source/NSPrintOperation.m b/Source/NSPrintOperation.m index afea689b8..d110026af 100644 --- a/Source/NSPrintOperation.m +++ b/Source/NSPrintOperation.m @@ -1212,6 +1212,8 @@ scaleRect(NSRect rect, double scale) - (NSGraphicsContext*)createContext { NSMutableDictionary *info; + NSAutoreleasePool *pool; + if (_context) return _context; @@ -1220,7 +1222,11 @@ scaleRect(NSRect rect, double scale) [info setObject: _path forKey: @"NSOutputFile"]; [info setObject: NSGraphicsContextPSFormat forKey: NSGraphicsContextRepresentationFormatAttributeName]; + /* We have to remove the autorelease from the context, because we need the + contents of the file before the next return to the run loop */ + pool = [NSAutoreleasePool new]; _context = RETAIN([NSGraphicsContext graphicsContextWithAttributes: info]); + [pool release]; return _context; }