WIRELESS TOOL KIT Note The Close method of the simulator.

zhaozj2021-02-16  47

When developing a MIDP application with WTK, you usually use the simulator to simulate the results. But sometimes the program is slower than once. Or you have already paid attention to the recycling of thread / object, but there will be such The phenomenon has indeed impact on us to determine the efficiency of us, improve operational convenience.

What is the reason? Many people closing the simulator, I like to press the "X" of Window to turn off. This is wrong, this is why the program runs slowly! This method is closed the simulator The result is that the Garbage Collector cannot recycle resources. The code in DestroyApp () cannot be executed, so the release resource code shaped to write is the same! The correct shutdown method should be before exiting the program (using Command control in the program, or the shutdown on the phone) Exit button), turn off the simulator, so that the simulator is the correctness of each execution!

转载请注明原文地址:https://www.9cbs.com/read-23321.html

New Post(0)