Re: _NSAutoreleaseNoPool missing in Snow Leopard
Re: _NSAutoreleaseNoPool missing in Snow Leopard
- Subject: Re: _NSAutoreleaseNoPool missing in Snow Leopard
- From: Klaus Backert <email@hidden>
- Date: Mon, 31 Aug 2009 03:46:20 +0200
On 31 Aug 2009, at 03:29, Roland King wrote:
DKT_LOG("initialize ODE library");
What does that macro do - does it create an autoreleased NSString
from its argument and then NSLog it? If so, that NSString is being
leaked as the message suggests.
The macro DKT_LOG is implemented in the following way.
#include <boost/current_function.hpp>
#define DKT_LOG_ENABLED
#define DKT_CURRENT_FUNCTION BOOST_CURRENT_FUNCTION
#ifdef DKT_LOG_ENABLED
#define DKT_LOG(MESSAGE) dkt::log(DKT_CURRENT_FUNCTION, __FILE__,
__LINE__, (MESSAGE))
#else
#define DKT_LOG(MESSAGE)
#endif
in the DktDebug.h file:
namespace dkt {
extern void log(char const * function, char const * file, long int
line, char const * message);
}
in the DktDebug.cpp file:
namespace dkt {
void log(char const * function, char const * file, long int line, char
const * message)
{
std::cerr << "<" << function << "> " << message << " at " << file
<<":" << std::dec << line << std::endl << std::flush;
}
}
Klaus
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden