From 14d33b3c1fd629ca3ebc2f369b38d9d2ebc09e2e Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 18 Aug 2009 15:37:31 +0000 Subject: BGE guardedalloc, Uses WITH_CXX_GUARDEDALLOC but gives a string to MEM_mallocN for better tracking memory usage. * off by default. * new/delete are at the bottom of each class * python BGE objects have the new/delete in the Py_Header macro. --- source/gameengine/Ketsji/KX_IPO_SGController.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'source/gameengine/Ketsji/KX_IPO_SGController.h') diff --git a/source/gameengine/Ketsji/KX_IPO_SGController.h b/source/gameengine/Ketsji/KX_IPO_SGController.h index 031b74294ce..68a74c3a364 100644 --- a/source/gameengine/Ketsji/KX_IPO_SGController.h +++ b/source/gameengine/Ketsji/KX_IPO_SGController.h @@ -116,6 +116,12 @@ public: m_ipotime = time; m_modified = true; } + +#ifdef WITH_CXX_GUARDEDALLOC +public: + void *operator new( unsigned int num_bytes) { return MEM_mallocN(num_bytes, "GE:KX_IpoSGController"); } + void operator delete( void *mem ) { MEM_freeN(mem); } +#endif }; #endif //__IPO_SGCONTROLLER_H -- cgit v1.2.3