izb
izb

Reputation: 51850

Are threads really not being garbage collected on WTK emulator?

I'm pretty sure I'm not going mad when I say that Thread objects do not seem to be garbage collected in my J2ME application when running on the WTK emulator (v 2.5.2_01).

I have a console message when my run method exits, and it is printed. At the same time I make a call back to the only object that has a reference to the thread and tell it to null its reference, which it duly does.

I then start a new thread later on in exactly the same way. Every time I start a new thread, the number of Thread objects on the WTK's memory monitor goes up by one. It never goes down. Start enough threads and eventually my app starts to slow down.

Is this a known bug in the WTK?

Upvotes: 0

Views: 119

Answers (1)

matt b
matt b

Reputation: 140061

Are you absolutely positive no other object contains a reference to this Thread, and that there is no way that this Thread is actually still doing anything?

Upvotes: 0

Related Questions