Memory Leak in RDbView::Prepare API
| Thu, 2008-06-26 08:20 | |
|
|
My application is working fine without any issue ............... Any idea why this is happening ? |
| Thu, 2008-06-26 08:20 | |
|
|
My application is working fine without any issue ............... Any idea why this is happening ? |
Forum posts: 1232
I'm not really sure what you mean?
If you put __UHEAP_MARK directly before that piece of code, and then MARKEND directly after, you should get an ALLOC panic...
That's because either Prepare or EvaluateAll (or both) allocate memory, and it will not be freed until you "Close" the view.
I'm also not sure what you are trying to "look for"?
If you have a memory leak in your app, you will get an ALLOC panic on exit, if you don't get that, you don't have a leak.
If you do get ALLOC panic on exit, the easiest way to track it down is not to move around MARK/MARKEND in your code, the easiest way is to use HookLogger from symbian:
http://developer.symbian.com/main/tools_and_sdks/developer_tools/supported/hook_logger/index.jsp
It (among other things) tracks all allocations and deallocations, and you can at any point list them all, including the callstack that generated the allocation.
If you look in the list whilst the "ALLOC" panic dialog is showing, you will get a nice list of all your leaks, and you can fix them all at the same time.