Using Apple autorelease pools without Objective-C
Posted
by PierreBdR
on Stack Overflow
See other posts from Stack Overflow
or by PierreBdR
Published on 2010-04-01T01:09:01Z
Indexed on
2010/04/01
1:13 UTC
Read the original article
Hit count: 413
I am developing an application that needs to work on Linux, Windows and Mac OS X. To that purpose, I am using C++ with Qt.
For many reasons, on Mac OS X, I need to use CoreFoundation functions (such as CFBundleCopyBundleURL
) that creates core objects that need to be released with CFRelease
. But doing so generate a lots of these warnings:
*** __NSAutoreleaseNoPool(): Object 0x224f7e0 of class NSURL autoreleased with no pool in place - just leaking
All the code I've seen concerning these autorelease pools are written in Objective-C. Does anybody know how to create/use autorelease pools in C or C++?
© Stack Overflow or respective owner