Salival
Member
|
Mem Leak Detection.
Suggestion to make the APP_MEM_LEAKS flag write a log file with:
[Addr] [FileName] [Line] [Size in bytes]
Should be good when the project is huge.
Ofc this can be done by overide the new/delete operations in main header to, But better to have it from engine =)
Something like:
inline void * __cdecl operator new(unsigned int size, const char *file, int line)
{
AddToList.
};
inline void __cdecl operator delete(void *p)
{
Remove from List.
};
At exist:
Print list (only leaks left)
(This post was last modified: 12-22-2010 03:10 PM by Salival.)
|
|
12-22-2010 03:09 PM |
|
Esenthel
Administrator
|
RE: Mem Leak Detection.
It's recommended to use memory containers for storing data (Memc,Memb..), they delete memory automatically, no worries for leaks
|
|
12-22-2010 03:14 PM |
|
Salival
Member
|
RE: Mem Leak Detection.
(12-22-2010 03:14 PM)Esenthel Wrote: It's recommended to use memory containers for storing data (Memc,Memb..), they delete memory automatically, no worries for leaks
Okay.
(This post was last modified: 12-22-2010 04:08 PM by Salival.)
|
|
12-22-2010 04:07 PM |
|