Wednesday, April 14, 2010

for my notes

Back to hacking some C on the Mac. Ran into a bug that seems to be osx or xcode related. No time to track it down now. So, i'm putting it here so I can find it when I need it:

bug:

mind(16331) malloc: *** error for object 0x74: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug

solution:

http://discussions.apple.com/thread.jspa?messageID=10244508

unrelated - using the "Curiously Recurring Template Pattern" which lets us use virtual functions without the cost of dynamic polymorphism:

http://www.gamedev.net/reference/articles/article2015.asp


okthx