Tag: 内存泄漏

这个Handler类应该是静态的或者可能发生泄漏:IncomingHandler

我正在开发一个带有服务的Android 2.3.3应用程序。 我有这个服务与主要活动沟通: public class UDPListenerService extends Service { private static final String TAG = "UDPListenerService"; //private ThreadGroup myThreads = new ThreadGroup("UDPListenerServiceWorker"); private UDPListenerThread myThread; /** * Handler to communicate from WorkerThread to service. */ private Handler mServiceHandler; // Used to receive messages from the Activity final Messenger inMessenger = new Messenger(new IncomingHandler()); // Use […]