Hi, i'm getting a couple of error's and i think it's memory related. I've read of the helpful topics here, http://www.mosync.com/content/ran-out-heap-memory & article here, http://www.mosync.com/blog/2010/11/quick-note-memory-alignment-errors. Having come from a c++ background (one of the reason i chose mosync :)) i understand basic memory management, new and delete, the heap and the stack.
The error i'm getting is as follows.
[1] MoSync Panic 40003. "Resource handle out of bounds" The panic occurred in the syscall maDestroyObject.
I've nailed this down to two simple lines of code. in the main class i'm doing this;
m_IndexScreen = new IndexScreen(this);
indexscreen is another class which setups the next screen (works fine).
But when i add this line in my main class destructor.
delete m_IndexScreen;
when quitting my application i get the above error. Very stange.
Strange still because this morning i had this code in (and more) and it worked fine, but another errror i was having caused me to reduce all code back to the simplest form, to see if i could find that error. If anyone could give me an idea on that i would be grateful.
NOW the real crux of a problem i'm having.
"Malloc failed. You most likely ran out of heap memory. Try to increase the heap size."
As i said i read the above linked topic, increased my Heap, stack and data sizes. Ran the code, there seems to be enough memory and i've very careful with my clean up. I clean up all parent widgets (deleting children with them) and all new's that are created. There mainly for new screens.
I'm making a very basic page by page information app, with a couple images and text on it, nothing ground breaking. This problem only seems to come about when i added my 6th page. So too much memory usage makes sense. I can only assume i have memory leak somewhere or i'm missing a trick.
I'm gonna attach what i've done so far. If anyone can help i'd appredicate it.
Thanks Kyle.
| Attachment | Size |
|---|---|
| NetherInnAndroid.rar | 645.31 KB |
| NetherInnAndroid.zip | 650 KB |