memory-leaks

AFNetworking code giving me Memory Leaks

梦想与她 提交于 2020-01-05 17:49:19
问题 @implementation GetData static NSString *string = @"https://afternoon-springs-7986.herokuapp.com/"; static NSString *baseStr = @"https://afternoon-springs-7986.herokuapp.com/updateInformation"; -(void) postEventInfo: (NSDictionary *) eventInfoObject { NSURL *url = [NSURL URLWithString:string]; // 6.5% // NSURL *baseURL = [NSURL URLWithString:@"http://localhost:5000/"]; UIWindow *window = [[UIApplication sharedApplication] keyWindow]; UIView *topView = window.rootViewController.view; self

Memory Leak in Grails with MongoDB

二次信任 提交于 2020-01-05 12:11:25
问题 I've found a strange issue when saving or updating several objects in Grails with MongoDB. Currently I'm using Grails 2.2.3 and MongoDB plugin 1.3.0. The problem seems to be that the instances of MiUsuario are never GC neither when I manually call the GC. In our main application we don't make batch updates, but when doing load tests (with JMeter and monitoring JVM with Java VisualVM) this problem causes memory filling and Tomcat stops responding. I've created a small new application to show

Texture2d.SaveAsPng() Memory Leak

白昼怎懂夜的黑 提交于 2020-01-05 10:18:47
问题 I have found strange issue with method Texture2d.SaveAsPng() Every call 1.5mb disapear. I use this method to save texture to isolated storage public static void SaveTextureToISF(string fileName, Texture2D texture) { using (IsolatedStorageFile file = IsolatedStorageFile.GetUserStoreForApplication()) { using ( IsolatedStorageFileStream fileStream = new IsolatedStorageFileStream(fileName, FileMode.Create, file) ) { texture.SaveAsPng(fileStream, texture.Width, texture.Height); fileStream.Close();

Dump all variables in PHP

核能气质少年 提交于 2020-01-05 08:53:45
问题 There's a memory leak in my script and I couldn't find it after 2 days. I found the loop that is causing the memory leak; each iteration of the loop increases the memory usage. I moved the loop into a function to isolate the variables. At the end of the function, I unsetted every variable created by the function so that get_defined_vars() returns an empty array. Here's what I mean: function the_loop(){ $var="value"; ... // processing, including using a library unset($var); print_r(get_defined

java OutOfMemoryError: bitmap size exceeds VM budget

余生颓废 提交于 2020-01-05 07:02:13
问题 I have ImageView & one button on my ImageActivity. when the button is clicked the available images are listed, when one of them is clicked, it is loaded into the ImageView. imageView xml: <ImageView android:id="@+id/imageView" android:layout_width="300dip" android:layout_height="300dip" android:src="@android:drawable/alert_light_frame" /> Please see the code: public class ImageActivity extends Activity { private static final int SELECT_PICTURE = 1; private String selectedImagePath; private

C++ memory leak with class members

南笙酒味 提交于 2020-01-05 06:50:34
问题 Debug_VLD in VS2010 reveals some memory leaks that come from class member creation / initialization / deletion. my_member is a data member with type double*. In constructor, I have my_member = NULL ; Then in some method, i need to allocate memory for my_member . I cannot do so in constructor, since i dont know size of array yet, and/or size may different for different calls of the method. What i do in this method is checking if member is NULL. if so, i allocate space for it, if not, i can

Confusing reference ownership: how to properly deallocate (via Py_DECREF) objects of an object?

岁酱吖の 提交于 2020-01-05 06:30:11
问题 I was analysing the following code, which compiles and runs correctly, but generates a memory leak. The cfiboheap is a C implementation of a Fibonacci Heap and the following code is a Cython wrapper (a part of it) for cfiboheap . My doubts starts on the insert function. The object data has been created somewhere and passed to the function insert() . Since the function wants to add this object to the fiboheap it increases its reference count. But afterwards? To whom the ownership goes? In my

Confusing reference ownership: how to properly deallocate (via Py_DECREF) objects of an object?

旧街凉风 提交于 2020-01-05 06:30:11
问题 I was analysing the following code, which compiles and runs correctly, but generates a memory leak. The cfiboheap is a C implementation of a Fibonacci Heap and the following code is a Cython wrapper (a part of it) for cfiboheap . My doubts starts on the insert function. The object data has been created somewhere and passed to the function insert() . Since the function wants to add this object to the fiboheap it increases its reference count. But afterwards? To whom the ownership goes? In my

Service com.google.android.youtube.api.service.YouTubeService has leaked IntentReceiver uds@5fa5135

笑着哭i 提交于 2020-01-05 04:15:11
问题 Every time I remove the YouTubePlayerSupportFragment from the back stack, I get the error below in the logcat: 06-12 02:08:46.937 8805-8805/ D/GA_DEBUG: Event_category:VideoContent-Portrait-This artist uses unique methods to paint his pottery action:play label:youtube {&el=youtube, &ec=VideoContent-Portrait-This artist uses unique methods to paint his pottery, &t=event, &ea=play, &cd6=online} 06-12 02:08:46.945 10194-10194/? E/ActivityThread: Service com.google.android.youtube.api.service

Android: Memory error because of an ImageView?

生来就可爱ヽ(ⅴ<●) 提交于 2020-01-04 16:25:06
问题 I have 2 activities Activity A = GameActivity uses an instance of PhotoTask.class which extends AsyncTask and is used to take and save picture. Once the picture is saved, I start Activity B = ShareActivity. When I take a picture and don't change the orientation, Activity B is called and everything works fine. Yet, if I change the orientation of the screen to take the picture (I pass from portait to landscape) I have errors when I take a picture (Activity B does not start). I even commented my