Several __NSAutoreleaseNoPool console messages just on CocoaGDIObjects initialization
Original Reporter info from Mantis: accSone
-
Reporter name:
Original Reporter info from Mantis: accSone
- Reporter name:
Description:
During initialization of CocoaGDIObjects the following console messages appear:
16.11.13 12:40:15 project1[2022] *** __NSAutoreleaseNoPool(): Object 0x100a1d620 of class NSCFNumber autoreleased with no pool in place - just leaking
16.11.13 12:40:15 project1[2022] *** __NSAutoreleaseNoPool(): Object 0x100a1e000 of class NSCFNumber autoreleased with no pool in place - just leaking
16.11.13 12:40:15 project1[2022] *** __NSAutoreleaseNoPool(): Object 0x100a1e020 of class NSCFNumber autoreleased with no pool in place - just leaking
16.11.13 12:40:15 project1[2022] *** __NSAutoreleaseNoPool(): Object 0x100a05040 of class NSCFDictionary autoreleased with no pool in place - just leaking
16.11.13 12:40:15 project1[2022] *** __NSAutoreleaseNoPool(): Object 0x7fff70ebc470 of class NSCFString autoreleased with no pool in place - just leaking
16.11.13 12:40:15 project1[2022] *** __NSAutoreleaseNoPool(): Object 0x7fff70ebafd0 of class NSCFString autoreleased with no pool in place - just leaking
16.11.13 12:40:15 project1[2022] *** __NSAutoreleaseNoPool(): Object 0x7fff70eb9210 of class NSCFString autoreleased with no pool in place - just leaking
16.11.13 12:40:15 project1[2022] *** __NSAutoreleaseNoPool(): Object 0x7fff70ebca70 of class NSCFString autoreleased with no pool in place - just leaking
16.11.13 12:40:15 project1[2022] *** __NSAutoreleaseNoPool(): Object 0x7fff70eb9a90 of class NSCFString autoreleased with no pool in place - just leaking
16.11.13 12:40:15 project1[2022] *** __NSAutoreleaseNoPool(): Object 0x7fff70eb5b50 of class NSCFString autoreleased with no pool in place - just leaking
16.11.13 12:40:15 project1[2022] *** __NSAutoreleaseNoPool(): Object 0x7fff710185a8 of class NSCFString autoreleased with no pool in place - just leaking
16.11.13 12:40:15 project1[2022] *** __NSAutoreleaseNoPool(): Object 0x7fff70eb5b50 of class NSCFString autoreleased with no pool in place - just leaking
16.11.13 12:40:15 project1[2022] *** __NSAutoreleaseNoPool(): Object 0x7fff70eb9a90 of class NSCFString autoreleased with no pool in place - just leaking
16.11.13 12:40:15 project1[2022] *** __NSAutoreleaseNoPool(): Object 0x7fff710185a8 of class NSCFString autoreleased with no pool in place - just leaking
16.11.13 12:40:15 project1[2022] *** __NSAutoreleaseNoPool(): Object 0x7fff70eb9a90 of class NSCFString autoreleased with no pool in place - just leaking
16.11.13 12:40:15 project1[2022] *** __NSAutoreleaseNoPool(): Object 0x7fff710185a8 of class NSCFString autoreleased with no pool in place - just leaking
16.11.13 12:40:15 project1[2022] *** __NSAutoreleaseNoPool(): Object 0x7fff70eb9a90 of class NSCFString autoreleased with no pool in place - just leaking
16.11.13 12:40:15 project1[2022] *** __NSAutoreleaseNoPool(): Object 0x7fff70eb9a90 of class NSCFString autoreleased with no pool in place - just leaking
16.11.13 12:40:15 project1[2022] *** __NSAutoreleaseNoPool(): Object 0x7fff70eb9a90 of class NSCFString autoreleased with no pool in place - just leaking
16.11.13 12:40:15 project1[2022] *** __NSAutoreleaseNoPool(): Object 0x100a15220 of class NSCFNumber autoreleased with no pool in place - just leaking
16.11.13 12:40:15 project1[2022] *** __NSAutoreleaseNoPool(): Object 0x100a24ed0 of class __NSFontTypefaceInfo autoreleased with no pool in place - just leaking
16.11.13 12:40:15 project1[2022] *** __NSAutoreleaseNoPool(): Object 0x100a25410 of class NSAffineTransform autoreleased with no pool in place - just leaking
16.11.13 12:40:15 project1[2022] *** __NSAutoreleaseNoPool(): Object 0x100a25890 of class NSFont autoreleased with no pool in place - just leaking
16.11.13 12:40:15 project1[2022] *** __NSAutoreleaseNoPool(): Object 0x100a25ac0 of class NSFont autoreleased with no pool in place - just leaking
16.11.13 12:40:15 project1[2022] *** __NSAutoreleaseNoPool(): Object 0x100a2b120 of class __NSArray0 autoreleased with no pool in place - just leaking
16.11.13 12:40:15 project1[2022] *** __NSAutoreleaseNoPool(): Object 0x100a278e0 of class NSCustomReleaseData autoreleased with no pool in place - just leaking
That will lead to memory leaks.
Steps to reproduce:
Create simpe 64bit cocoa app, run it and you will see the messages in console during CocoaGDIObjects initalization section.
initialization
DefaultBrush := TCocoaBrush.CreateDefault;
DefaultPen := TCocoaPen.CreateDefault;
DefaultFont := TCocoaFont.CreateDefault;
DefaultBitmap := TCocoaBitmap.CreateDefault;
DefaultContext := TCocoaBitmapContext.Create;
DefaultContext.Bitmap := DefaultBitmap;
They are created during DefaultFont and DefaultBitmap creation.
Additional information:
Solution:
constructor TCocoaFont.CreateDefault(AGlobal: Boolean = False);
begin
Create(NSFont.systemFontOfSize(0));
end;
has no NSAutoreleasePool coverage. NSAutoreleasePool handling has to be reworked for TCocoaFont
Mantis conversion info:
- Mantis ID: 25321
- OS: OSX
- OS Build: 10.6.8
- Platform: darwin x86_64
- Version: 1.3 (SVN)
- Fixed in version: 1.2.0
- Fixed in revision: 43457 (#e700e2df)