Android Strict Mode Policy : A tool to catch the bug in the Compile Time. The below code deals with leaks of memory, like it detects when in SQLLite finalize is called or not.

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Insert
> Step 2: And Like the video. BONUS: You can also share it!

Example

StrictMode.setVmPolicy(new StrictMode.VmPolicy.Builder()  
    .detectActivityLeaks()  
    .detectLeakedClosableObjects()  
    .penaltyLog()  
    .build()); 


Got any Android Question?