memory-leaks

Memory leak when redeploying application in Tomcat

情到浓时终转凉″ 提交于 2020-01-08 15:49:43
问题 When I redeploy my application in tomcat, I get the following issue: The web application [] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@10d16b]) and a value of type [com.sun.xml.bind.v2.runtime.property.SingleElementLeafProperty] (value [com.sun.xml.bind.v2.runtime.property.SingleElementLeafProperty@1a183d2]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak. Also, am using ehcache in my

Memory leak in django when keeping a reference of all instances of forms

爷,独闯天下 提交于 2020-01-07 05:44:05
问题 This is a followup to this thread. I have implemented the method for keeping a reference to all my forms in a array like mentioned by the selected answer in this but unfortunately I am getting a memory leak on each request to the django host. The code in question is as follows: This is my custom form I am extending which has a function to keep reference of neighboring forms, and whenever I instantiate a new form, it just keeps getting added to the _instances stack. class StepForm(ModelForm):

ShareKit beta issues?

穿精又带淫゛_ 提交于 2020-01-07 04:35:10
问题 I have made a so-called ShareKit beta, it has many fixes for warnings and also features a new SMS share component. This should dramatically be faster on all iOS's. Feel free to download it and of course add a comment if you would like to see a new feature added! Thanks! ChangeLog: 1.0 : Fixed most warnings, made some improvements. Also fixed some leaks 1.1 : Added SMS capabilities, fixed all warnings and leaks. And made other misc. fixes 1.2 Coming Soon : Will feature the latest FBConnect so

Binding WPF DataGrid ItemsSource creates memory leak

ぃ、小莉子 提交于 2020-01-07 04:25:09
问题 I'm simply creating a Observable collection in Background and binding to it. All objects inherit from INotifyPropertyChanged. but nevertheless the Memory consumption is continuously raising. The following Objects instances are continuously raising WeakReference FrugalObjectList<WeakEventManager+Listener> ConditionalWeakTable<TKey, TValue>+Entry<Object, Object>[] WeakEventTable+EventKey ConditionalWeakTable<Object, Object> SingleItemList<WeakEventManager+Listener> Object Int32[]

Design pattern to detect memory leaks for reference counted smart pointers

喜欢而已 提交于 2020-01-07 03:55:17
问题 We have our own smart pointers class which is reference counted using basic AddRef and Release. While debugging I am able to see lot of objects not being released properly. I can see which objects not being released but its hard to find out from which place they get allocated. Is there any good design pattern to address this problem? I have put debug statements and ADDREF and RELEASE and I can see reference count when release is called . In some cases its more than 1, that means pointer is

CGImage related memory leak in SceneKit application

房东的猫 提交于 2020-01-07 03:00:32
问题 I am writing a 3d game using Scene Kit. When I used Leaks profile in Instruments, I find leaks exist. For the first red cross icon, it says 51 new leaks. Also if you see further down the leak checks area, there are grayed out dashed icons which say no new leaks. To put it in context, I try to recreate a scene after one unit of play is completed and present that using presentScene... . That would crash after 4 or 5 units of play. I was getting memory warnings and hence I used the leaks profile

Memory Leak with no dynamic memory

て烟熏妆下的殇ゞ 提交于 2020-01-07 00:08:18
问题 I was wondering if you you could have a memory leak on the heap without having any dynamic memory allocated. However, I do have three vectors declared and initialized. Is it because I need to deallocate the vector before I close the program. 回答1: I just found the problem, it was the exit function that I was using to close the program. exit does not call the destructors of any stack based objects so if those objects have allocated any memory internally then yes that memory will be leaked.

URLClassLoader Memory Leak Java

守給你的承諾、 提交于 2020-01-06 21:01:09
问题 I have been going through a lot of URLClassLoader Memory leak solutions on the internet, but I haven't found any fully working code and precise solution. The closest to a solution I found was this Any fully functional code or link to it, which uses WeakHashMap() or any other definite way of eliminating memory leak problem on multiple redeploys? 回答1: just add the dependency of class loader leak preventer in your build path. maven dependency for this is : <!-- For Classloader leak protection --

iOS: Debugging memory leaks for UILabel in swift

放肆的年华 提交于 2020-01-06 20:23:47
问题 I new to profiling and using instruments in xcode. I am facing of problem of memory leaks in tableViewCell for UILabel(CALayer). In my code all the tableViewCell have a fixed view called bottomView. This bottomView may or may not contain UILabel which can be either directly within bottomView or within a subView of bottomView. Every time within the init method for cell I check for bottomView and remove it from superView and set it to nil. Then reinitialise the bottomView (using UIView(frame: )

Python Memory Leak Using binascii, zlib, struct, and numpy

六眼飞鱼酱① 提交于 2020-01-06 19:38:56
问题 I have a python script which is processing a large amount of data from compressed ASCII. After a short period, it runs out of memory. I am not constructing large lists or dicts. The following code illustrates the issue: import struct import zlib import binascii import numpy as np import psutil import os import gc process = psutil.Process(os.getpid()) n = 1000000 compressed_data = binascii.b2a_base64(bytearray(zlib.compress(struct.pack('%dB' % n, *np.random.random(n))))).rstrip() print 'Memory