
Originally Posted by
grahamhughes
My first suggestions (for anyone writing a MIDP game):
Use only one Canvas. Switching between Displayable objects causes problems if you want to detect when your game is interrupted by an incoming call.
Create only one Thread. Multiple threads will make your life a nightmare.
So, create one Canvas instance and one Thread when the application starts, then keep them.
As to your memory leaks... are you dumping and re-loading 3D models? Or creating models dynamically? Series 60 implementations have problems garbage collecting 3D models, and tend to leak.
Load or create each model only once, and keep it.