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
Posts: 86
Registered: ‎12-06-2012
My Device: Curve 8520
My Carrier: Blackberry store

Getting ERROR: Context: Object name=" "ForeignWindow" " [objectId= 24 ] not unrealized

I am getting ERROR: Context: Object name=" "ForeignWindow" " [objectId= 24 ] not unrealized error when exiting the app.

Didn't get any refernce why i am getting this error.

Can any one give me suggestion on it?

Developer
Posts: 17,019
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: Getting ERROR: Context: Object name=" "ForeignWindow" " [objectId= 24 ] not unrealized

this usually means that an object is still in memory when the app closes. it can be a possible memory leak, but otherwise the memory is freed anyhow when the app is shut down.
check if you have any open sheets when you close the app, i had some issues with these.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Highlighted
Developer
Posts: 86
Registered: ‎12-06-2012
My Device: Curve 8520
My Carrier: Blackberry store

Re: Getting ERROR: Context: Object name=" "ForeignWindow" " [objectId= 24 ] not unrealized

Hi simon,

 

i am closing all sheets which r using in app on exit the app and also releasing all the pointers

i got "cleaning up on exit" in log and after that getting ERROR: Context: Object name=" "ForeignWindow" " [objectId= 24 ] not unrealized.

 

Developer
Posts: 86
Registered: ‎12-06-2012
My Device: Curve 8520
My Carrier: Blackberry store

Re: Getting ERROR: Context: Object name=" "ForeignWindow" " [objectId= 24 ] not unrealized

any solution for it ?

Developer
Posts: 6,152
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30
My Carrier: Orange

Re: Getting ERROR: Context: Object name=" "ForeignWindow" " [objectId= 24 ] not unrealized

It could be internal to the Cascade code, as long as you have checked to see that you are parenting all the objects you create and are freeing all the objects not parented it should be fine to ignore this.


If you've been helped click on Like Button, if you've been saved buy the app. Smiley Happy

Developer of stokLocker, Sympatico and Super Sentences.
Developer
Posts: 86
Registered: ‎12-06-2012
My Device: Curve 8520
My Carrier: Blackberry store

Re: Getting ERROR: Context: Object name=" "ForeignWindow" " [objectId= 24 ] not unrealized

when "cleaning up on exit" message display on console ? 

 

is it mean that all cleanup has done and can exit now?

 

Developer
Posts: 6,152
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30
My Carrier: Orange

Re: Getting ERROR: Context: Object name=" "ForeignWindow" " [objectId= 24 ] not unrealized

Not sure that I really understand you questions, sorry.

 

There's nothing you can do about the BlackBerry Library clean up and the messages it puts out on the console, but as I said as long as you have parented your objects correctly and properly cleaned up your own code then you should be able to exit safely.

 

If you are worried then one of several techniques I use is black box testing where I individually put each object in to a separate testing app for which its sole purpose is to create multiples of the same object, test all the public functions and then delete the object, I then look at the memory usage using Momentics Memory and Malloc information under the QNX System Information perspective.


If you've been helped click on Like Button, if you've been saved buy the app. Smiley Happy

Developer of stokLocker, Sympatico and Super Sentences.