• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: _NSAutoreleaseNoPool missing in Snow Leopard
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >_NSAutoreleaseNoPool missing in Snow Leopard (From: Seth Willits <email@hidden>)
 >Re: _NSAutoreleaseNoPool missing in Snow Leopard (From: Klaus Backert <email@hidden>)
 >Re: _NSAutoreleaseNoPool missing in Snow Leopard (From: Kyle Sluder <email@hidden>)
 >Re: _NSAutoreleaseNoPool missing in Snow Leopard (From: Klaus Backert <email@hidden>)
 >Re: _NSAutoreleaseNoPool missing in Snow Leopard (From: Roland King <email@hidden>)

  • Prev by Date: Re: _NSAutoreleaseNoPool missing in Snow Leopard
  • Next by Date: Re: _NSAutoreleaseNoPool missing in Snow Leopard
  • Previous by thread: Re: _NSAutoreleaseNoPool missing in Snow Leopard
  • Next by thread: Re: _NSAutoreleaseNoPool missing in Snow Leopard
  • Index(es):
    • Date
    • Thread