Android’s task manager (long pressing HOME key) will list both the recently closed Application(s) and Running Application(s), thus it obscure the traditional border, which is clear to both the user and developer in past time, between this two concepts/semantics, and, hence, put much more effort/confusion/complexity on developers to adapt to this new model, and the end users will be confused/mislead by this new model too – thought the app closed as usual (the user thought), but due this new model, the app still kept the data (the app’s developer designed to follow Android’s way) the user entered which the user do not want it be viewed at late time for some reason, or due to the developers design, the data did not persisted as the application seems to be “closed”, but at late time, the device crashed and so the data lost, or due to developers on purpose design to do some user unwanted background jobs when the application “closed”!
It changed the semantics of closing application which adopted for decades, and make things much more unnecessary complex and put the user in front of PRIVACY LEAKING, DATA LOST, UNWANTED and UNSTOPPABLE BEHAVIOUS/APPLICATIONS, and LOST CONTROL!
I DO NOT LIKE THIS DESIGN REALLY!
Eclipse 3.5 jee Galileo SR2 + WTP + M2Eclipse
no jars managed by maven were copied to WEB-INF/Lib, but the war that maven generated has those jars, it is very weird, no reasult found thru google, solved it by myself finally – simply add a classpath entry to tomcat’s lanuch configuration is enough
jmap -histo <pid>
(to connect to running process and print histogram of java object heap
jmap -dump:<dump-options> <pid>
(to connect to running process and dump java heap)
format=b binary default
file= dump heap to
Example: jmap -dump:format=b,file=heap.bin
or, run jconsole, select MBeans -> com.sun.management -> HotSpotDiagnostic -> Operations -> dumpHeap, fill p0 as deisred dump file path (if using Eclipse Mempry Analyzer to analyze it, the file extension is better to be .hprof), click dumpHeap button to dump it.
or, generate it using Eclipse Memory Analyzer directly
or, let jvm generate it when out of memory: add -XX:+HeapDumpOnOutOfMemoryError or -XX:+HeapDumpOnCtrlBreak, more details here: http://wiki.eclipse.org/index.php/MemoryAnalyzer#Getting_a_Heap_Dump
ps: dump file can be parsed by Eclipse Memory Analyzer
Finding Memory Leaks
Start by running the leak report to automatically check for memory leaks.
This blog details How to Find a Leaking Workbench Window.
The Memory Analyzer grew up at SAP. Back then, Krum blogged about Finding Memory Leaks with SAP Memory Analyzer. The content is still relevant!
Analyzing Java Collection Usage
Check out Krum’s blog about Analyzing Java Collections Usage with Memory Analyzer. Also, Memory for Nothing looks unused collections and the memory kept alive.