memory-leaks

Memory leakage in using `ggplot` on large binned datasets

泪湿孤枕 提交于 2021-02-08 03:57:15
问题 I am making various ggplot s on a very large dataset (much larger than the examples). I created a binning function on both x- and y-axes to enable plotting of such large dataset. In the following example, the memory.size() is recorded at the start. Then the large dataset is simulated as dt . dt 's x2 is plotted against x1 with binning. Plotting is repeated with different subsets of dt . The size of the ploted object is checked by object.size() and stored. After the plotting objects have been

IOSurface gradually increases memory in iOS 12 and above

馋奶兔 提交于 2021-02-07 11:58:17
问题 I am facing memory issue in my app for iOS 12 and above versions. IOSurface gradually increases simultaneously in iOS 12.1.1 where as it works fine in iOS 11 versions. I have attached the issue screenshot below, Why this issue happens in iOS 12 versions? Can someone help me how to solve this? I cross checked in iOS 11 versions and it works fine. 回答1: Do you use camera ? It may depends on camera. Size of IOSurface bock: 8372224 bytes = 1960*1080*4 来源: https://stackoverflow.com/questions

Memory leak with TensorFlow

蹲街弑〆低调 提交于 2021-02-07 11:24:46
问题 I have a memory leak with TensorFlow. I refered to Tensorflow : Memory leak even while closing Session? to address my issue, and I followed the advices of the answer, that seemed to have solved the problem. However it does not work here. In order to recreate the memory leak, I have created a simple example. First, I use this function (that I got here : How to get current CPU and RAM usage in Python?) to check the memory use of the python process : def memory(): import os import psutil pid =

javascript new keyword and memory leaks?

依然范特西╮ 提交于 2021-02-07 10:24:22
问题 let x = new MyClass(); ...[more code] let x = new MyClass(); Will the first instance of MyClass get garbaged collected automatically? Or do I need to explicitly x = null or something like that before the second assignment, in order to avoid a memory leak? 回答1: JavScript's memory is managed automatically, so objects that are deemed "unreachable" are collected by the garbage collector. In the example you provided, the object stored in x will be garbage-collected so long as it isn't reachable

gtkmm/c++ first hello world example leaking memory

一世执手 提交于 2021-02-07 06:26:10
问题 I'm trying to learn gtkmm, and decided to try gtkmm 2.4 for the time being since it seems to be pretty hard to get 3.0 working on Debian. Anyway, the example I'm trying is the one here: http://developer.gnome.org/gtkmm-tutorial/2.24/sec-helloworld.html.en. It compiles fine and it runs alright aswell, but when i close it valgrind reports a lot of leaks, something along the lines of this (after clicking the button once): ==4254== Memcheck, a memory error detector ==4254== Copyright (C) 2002

gtkmm/c++ first hello world example leaking memory

走远了吗. 提交于 2021-02-07 06:25:09
问题 I'm trying to learn gtkmm, and decided to try gtkmm 2.4 for the time being since it seems to be pretty hard to get 3.0 working on Debian. Anyway, the example I'm trying is the one here: http://developer.gnome.org/gtkmm-tutorial/2.24/sec-helloworld.html.en. It compiles fine and it runs alright aswell, but when i close it valgrind reports a lot of leaks, something along the lines of this (after clicking the button once): ==4254== Memcheck, a memory error detector ==4254== Copyright (C) 2002

How to find memory leaks with Clang

一世执手 提交于 2021-02-07 05:47:06
问题 I have installed Clang in my machine (ubuntu) in order to find memory leaks in my C code. I wrote a sample code in order to check the working of it which is as follows: /* File: hello.c for leak detection */ #include <stdio.h> #include <stdlib.h> void *x; int main() { x = malloc(2); x = 0; // Memory leak return 0; } I found some options in internet to compile like $ scan-build clang --analyze hello.c and $ scan-build clang -fsanitize=address hello.c But none of them are showing any signs of

FileReader memory leak in Chrome

与世无争的帅哥 提交于 2021-02-07 03:51:40
问题 I have a webpage with file upload functionality. The upload is performed in 5MB chunks. I want to calculate hash for each chunk before sending it to the server. The chunks are represented by Blob objects. In order to calculate the hash I am reading such blob into an ArrayBuffer using a native FileReader. Here is the code: var reader = new FileReader(); var getHash = function (blob, callback) { reader.onloadend = function (e) { var hash = util.hash(e.target.result); callback(hash); }; reader

Android memory leak with static final

假装没事ソ 提交于 2021-02-07 03:51:25
问题 The question is on using static final constants which apparently causes memory leaks: I have been searching for information on how not to cause memory leaks in Android Apps. One big problem is using private static final for constants. Apparently that is how constants should be defined. But static final means it hangs around after a rotation and means the Activity cannot be cleared. Obviously I am misunderstanding something. I know that putting variables in the Application context allows them

Android memory leak with static final

旧城冷巷雨未停 提交于 2021-02-07 03:50:01
问题 The question is on using static final constants which apparently causes memory leaks: I have been searching for information on how not to cause memory leaks in Android Apps. One big problem is using private static final for constants. Apparently that is how constants should be defined. But static final means it hangs around after a rotation and means the Activity cannot be cleared. Obviously I am misunderstanding something. I know that putting variables in the Application context allows them