RIP
Tutorial
Tags
Topics
Examples
eBooks
Tutorial by Examples
The below Code Snippet is to setup the StrictMode for Thread Policies. This Code is to be set at the entry points to our application.
StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder() .detectDiskWrites() .penaltyLog() //Logs a message to LogCat .build())
The below code deals with leaks of memory, like it detects when in SQLLite finalize is called or not.
StrictMode.setVmPolicy(new StrictMode.VmPolicy.Builder() .detectActivityLeaks() .detectLeakedClosableObjects() .penaltyLog() .build());
Page 1 of 1
1
Cookie
This website stores cookies on your computer.
We use cookies to enhance your experience on our website and deliver personalized content.
For more details on our cookie usage, please review our
Cookie Policy
and
Privacy Policy
Accept all Cookies
Leave this website