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 (Cocoa-dev@lists.apple.com)
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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to arch...@mail-archive.com