Reputation: 623
my j2me application shows out of memory exception in JBLEND. It work fine in JBED. By monitoring the memory, I realized that the document.parse(xmlParser) method consumes a lot of memory. I think the reason for the excption is memory is not freeing after parsing xml. is it right??? How can i solve the problem???
Upvotes: 0
Views: 1082
Reputation: 9953
Whatever document.parse(xmlParser)
returns, you should dereference it as soon a you don't need it anymore, i.e. you should set fields pointing to the returned object to null
(or unset indirect references).
I've never used JBLEND or JBED, but the Wireless Toolkit respectively JaveME SDK also has a nice memory profiler which helps you track down memory and object reference problems.
Upvotes: 1