- removed warnings in GLUI, thanks Jorrit Tyberghein for the patch!

- removed memory leaks from BasicDemo and Bullet library (other demos needs to be cleaned up!)
- added memory leak debugging functionality in btAlignedAlloc.h: #define BT_DEBUG_MEMORY_ALLOCATIONS
This commit is contained in:
ejcoumans
2007-10-31 08:00:03 +00:00
parent 42fc5b37cc
commit a101719687
15 changed files with 374 additions and 152 deletions

View File

@@ -21,12 +21,26 @@ subject to the following restrictions:
///that is better portable and more predictable
#include "btScalar.h"
//#define BT_DEBUG_MEMORY_ALLOCATIONS 1
#ifdef BT_DEBUG_MEMORY_ALLOCATIONS
void* btAlignedAlloc (size_t size, int alignment);
#define btAlignedAlloc(a,b) \
btAlignedAllocInternal(a,b,__LINE__,__FILE__)
void btAlignedFree (void* ptr);
#define btAlignedFree(ptr) \
btAlignedFreeInternal(ptr,__LINE__,__FILE__)
void* btAlignedAllocInternal (size_t size, int alignment,int line,char* filename);
void btAlignedFreeInternal (void* ptr,int line,char* filename);
#else
void* btAlignedAllocInternal (size_t size, int alignment);
void btAlignedFreeInternal (void* ptr);
#define btAlignedAlloc(a,b) btAlignedAllocInternal(a,b)
#define btAlignedFree(ptr) btAlignedFreeInternal(ptr)
#endif
typedef int size_type;