Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Developer
Developer
Posts: 46
Registered: ‎02-22-2012
My Device: Developer
My Carrier: Various
Accepted Solution

Sheet + memory leaks...

It would appear the Sheet class has some holes in it, leaking memory:

 

If you try something like:

 

for (int i=0;i<100;i++)

{

Sheet* x=Sheet::create();

delete(x);

}

 

then unless the Malloc Information pane in the QNX System Information perspective, Heap used number is a complete fabrication you will observe the heap used rise considerably.

 

Only 1 loop is required, but its Friday so 100 loops was typed in attempting to track down memory leaks using Sheets
.

 

 

Retired
Posts: 127
Registered: ‎02-27-2012
My Device: Bold
My Carrier: Rogers

Re: Sheet + memory leaks...

 

Hi bbj,

 

Thank you for pointing this out. This does seem like a vicious bug. Would you please report this through the developer issue tracker? 

https://www.blackberry.com/jira/secure/Dashboard.jspa

This is where all the issues are meant to be reported - it makes it possible for us to take your reports and escalate it internally as appropriate. Please include some sample code projects, snippets or logs if possible - the more information, the merrier.

 

Thanks,

Rashid

Developer
Developer
Posts: 46
Registered: ‎02-22-2012
My Device: Developer
My Carrier: Various

Re: Sheet + memory leaks...

Ok, have reported via link indicated - didnt know thats where you want bugs reported.

 

Not sure we can make the sample code any simpler to demonstrate the issue than the code fragment given, so posted that. Assume that if more info is needed you can email us back.

 

John

Retired
Posts: 127
Registered: ‎02-27-2012
My Device: Bold
My Carrier: Rogers

Re: Sheet + memory leaks...

 

Thanks for reporting the issue @bbj. I am sure someone will pick up from there, if the issue hasn't been reported / fixed already internally.

Retired
Posts: 127
Registered: ‎02-27-2012
My Device: Bold
My Carrier: Rogers

Re: Sheet + memory leaks...

Also,

 

May we know how exactly you are testing & detecting the memory leak? Are you making use of the QNX Momentics IDE's tools for this? 

 

That is, in the IDE: go to your launch configuration, Tools > Memory Analysis > Memory Tracing

Developer
Developer
Posts: 46
Registered: ‎02-22-2012
My Device: Developer
My Carrier: Various

Re: Sheet + memory leaks...

as per the original posting and the bug system report post

 

"Then unless the Malloc Information pane in the QNX System Information perspective, Heap used number is a complete fabrication you will observe the heap used rise considerably."

Highlighted
Retired
Posts: 127
Registered: ‎02-27-2012
My Device: Bold
My Carrier: Rogers

Re: Sheet + memory leaks...

Ah, okay. Thanks bbj. Missed that sentence in your original posts Smiley Happy