I built a game in j2me and I have memory leak because from time to time I get out of memory exception, now I want to spot where this leak is coming from and I heard you can do it with sun's wireless tool kit. Can someone explain me exactly what is this wireless tool kit, how I install it and how to use it in-order to find memory leaks ? Thanks in advance !
相关问题
- JVM issues with a large in-memory object
- How to avoid out of memory python?
- Dataset does not fit in memory
- Ruby: Prawn PDF out of memory when using the group
- How to make sure the training phase won't be f
相关文章
- Button Image Problem
- How to free image cache/memory in Windows Phone 8?
- BitmapFactory.decodeStream() returns a Bitmap ~100
- What unit-test frameworks would you recommend for
- OutOfMemoryException - out of ideas
- Java crashing before filling up heap space
- SQLite for BlackBerry
- Tomcat memory usage (PermGen)
I do not know oracle sdk 3.4, but in wtk2 memory monitor was only partially useful for finding memory leaks, because it only shows how many (and which) objects are live, but not where they are referenced from. So it takes a review of corresponding piece of code.
Memory leaks are easier to find with a java profiler. You need to get one that suits you (I prefer YourKit, but it is commercial product with a trial period), modify emulator's command line in order to allow the profiler to connect (that should be covered by profiler's documentation, it is basically about adding
-agentlib
or-Xrun...
option) to it, and do actual profiling (every profiler comes with a guide of how to do it).After you download wtk,Go to \bin\utilsw.exe.Under Utilities you will see "Memory monitor".Here you can graphically view app memory/RAM usage.