简体   繁体   中英

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?

您是否绝对肯定,没有其他对象包含对此线程的引用,并且该线程实际上仍然无法执行任何操作?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM