memory-leaks

Will we leak the android service connection if the client's process is killed by android?

别等时光非礼了梦想. 提交于 2020-01-04 01:57:07
问题 Condition: I have a client activity "X" of a remote service (with AIDL) that calls the bindService() in the onCreate() and unbindService() in the onDestroy() . Assume that this activity has been started but not in the foreground ( onStop() has happened). It is said that when android system needs more memory elsewhere it might kill the process of another activity with less priority (possibly "X"). If, says, the android system decides to kill "X"'s process, according to the activity-lifecycle

Possible native memory release error in Java

删除回忆录丶 提交于 2020-01-03 18:32:08
问题 [This works properly single-threaded] EDIT: Test passes on Windows 8; Fails consistently on Ubuntu 14.04 EDIT 2: Current thinking is that this is *nix related issue of obtaining proper memory usage information. I am looking for some confirmation from the gurus here on stack overflow that this is indeed a problem and that I am not imagining it. I have been working with alloc/dealloc memory in Java using Unsafe. I found some really odd behaviour and couldn't understand what I was doing to not

Possible native memory release error in Java

女生的网名这么多〃 提交于 2020-01-03 18:32:07
问题 [This works properly single-threaded] EDIT: Test passes on Windows 8; Fails consistently on Ubuntu 14.04 EDIT 2: Current thinking is that this is *nix related issue of obtaining proper memory usage information. I am looking for some confirmation from the gurus here on stack overflow that this is indeed a problem and that I am not imagining it. I have been working with alloc/dealloc memory in Java using Unsafe. I found some really odd behaviour and couldn't understand what I was doing to not

memory leak when deleting derived class with base-class pointer

杀马特。学长 韩版系。学妹 提交于 2020-01-03 17:21:32
问题 I have an issue with a memory leak. I have a base-class pointer. From it, I use new to allocate different derived classes. Then, when I try to delete those classes with the reference (not typecasted), I get a memory leak. I researched the problem and found that I should add a virtual destructor to the base-class, but I tried this and I still have a memory leak; that is, according to my task-manager, the memory usage continues to rise with each allocation and deletion of the derived class

Will multiple presentViewController method calls throughout the view controllers lead to memory leak in iOS?

断了今生、忘了曾经 提交于 2020-01-03 17:15:08
问题 I know there has been a lot of discussions occurred related to this topic. But in all discussions all have discussed with 2 view controllers (A&B). My scenario is similar but different. What will happen when there are multiple view controllers like A,B,C,D. So the presenting flow moves as , View controller A (Home) presents View controller B(List). Then from View controller B presents View Controller C (Details).Then from View Controller C presents View Controller D(Advanced Details). Then

Android - view.Surface OutOfResourcesException

笑着哭i 提交于 2020-01-03 17:03:39
问题 My Android app seems to not be releasing its views when I move around inside of it with ListView navigation and with the standard Menu key. After a hundred or so different (of the 10 or so unique views) loads, it starts lagging and black screening. Error log: 07-01 09:54:42.913: INFO/ActivityManager(1279): Starting: Intent { cmp=com.site.android.conferencecompanion/.Search } from pid 31290 07-01 09:54:43.013: ERROR/msm7x30.gralloc(1279): /dev/pmem: no more pmem available 07-01 09:54:43.013:

Inner Class has an implicit reference to the outer class and may can leak memory

不羁岁月 提交于 2020-01-03 13:41:13
问题 After learning about the inner class, I understand it has an implicit reference to the outer class. But my teacher told me that the best way is not use inner class, prefer to use static inner class. Because the inner class may leak memory. Can someone kindly explain about this? 回答1: In the answer to your comment (it would be unreadable if I posted it in the comments), where it belongs. Example of accesing inner class outside the outer. public class Dog { String name; } public class HugeKennel

Visual Leak Detector not finding leaks VS2013

断了今生、忘了曾经 提交于 2020-01-03 13:09:30
问题 I can't seem to make VLD catch any memory leaks no matter what I tried. Any ideas why ? Here snippet of the output too: Visual Leak Detector Version 2.4RC2 installed. The thread 0x5748 has exited with code 0 (0x0). The thread 0x2c70 has exited with code 0 (0x0). The thread 0x3c98 has exited with code 0 (0x0). No memory leaks detected. Visual Leak Detector is now exiting. The program '[24988] ConsoleApplication2.exe' has exited with code 0 (0x0). #include <vld.h> #include <iostream> using

Visual Leak Detector not finding leaks VS2013

微笑、不失礼 提交于 2020-01-03 13:09:10
问题 I can't seem to make VLD catch any memory leaks no matter what I tried. Any ideas why ? Here snippet of the output too: Visual Leak Detector Version 2.4RC2 installed. The thread 0x5748 has exited with code 0 (0x0). The thread 0x2c70 has exited with code 0 (0x0). The thread 0x3c98 has exited with code 0 (0x0). No memory leaks detected. Visual Leak Detector is now exiting. The program '[24988] ConsoleApplication2.exe' has exited with code 0 (0x0). #include <vld.h> #include <iostream> using

Visual Leak Detector not finding leaks VS2013

£可爱£侵袭症+ 提交于 2020-01-03 13:09:06
问题 I can't seem to make VLD catch any memory leaks no matter what I tried. Any ideas why ? Here snippet of the output too: Visual Leak Detector Version 2.4RC2 installed. The thread 0x5748 has exited with code 0 (0x0). The thread 0x2c70 has exited with code 0 (0x0). The thread 0x3c98 has exited with code 0 (0x0). No memory leaks detected. Visual Leak Detector is now exiting. The program '[24988] ConsoleApplication2.exe' has exited with code 0 (0x0). #include <vld.h> #include <iostream> using