Questions tagged [memory-leaks]

2

votes
1

answer
22

Views

Relation between pointers and arrays

I was pretty sure that *(pointer+1) = pointer[1]. My problem is that when i run this code: if (NULL == (*str_array = (char **)malloc(sizeof(char *)*10))) { return ERROR; } splitter = strtok(str, TOKEN); while(splitter != NULL){ if (NULL == ((*str_array )[i] =(char *)malloc(sizeof(char)*strlen(str) +...
Julian Rosenfeld
2

votes
0

answer
23

Views

C, leak on fork without malloc

I'm trying to understand how memory allocation work on fork, even on static or dynamic allocation. I've some trouble to understand some leaks as shown below. With this program : #include #include int main(int argc, char **argv) { pid_t pid; int status; pid = fork(); if (pid == 0) return (...
rSim
0

votes
0

answer
4

Views

JProfiler Heap Walker - select objects that are held by GC Root located in specific Java packages

I have JavaFX application and I have made Heap Snaphot using JProfiler 10.1.5. My current object set (filtered using "use new" selection step) has 46064 objects in 672 classes. I would like to narrow the search range for memory leaks, and filter my current object set to have only objects that are h...
sgnsajgon
3

votes
0

answer
29

Views

Detect when IE11, with its built-in memory leak, runs out of memory (1.5GB recyclable pool)

IE11 has a well-documented iframe memory leak. In a SPA, if you are using iframes the memory will grow to about 1.5GB after which time it will slow down until a crash. My task is to detect when the browser is about to crash and restart the page soon enough. The application is Vue.JS that is embedded...
Edza
0

votes
3

answer
137

Views

How to find possible memory leaks

Does anyone of you know how to find possible memory leaks with re-frame applications. we have app with React and Processing. The problem is that we have a Canvas element with Processing.js, but when we destroy it the Canvas elements are still in the heap. I tried to look into it but always end up at...
wiki one
0

votes
0

answer
6

Views

Memory leak in Bundle.main.loadNibNamed

I have strange memory leak in my class BottomTabView. I have class func for load it class instance from xib by Bundle.main.loadNibNamed @objc class func loadFromNib() -> BottomTabView? { if let topLevelObjects = Bundle.main.loadNibNamed("BottomTabView", owner: nil, options: nil) { //
EvGeniy Ilyin
0

votes
0

answer
6

Views

Pyshark library memory issue

I Would like some help on managing memory consumption of pyshark library. Using it creates an effect of requiring more memory as you process more pcap files. I guess that something is no dereferenced and thus stays in memory forever. For example if you run this script with any pcap file, you will se...
Ciro Alvaro
1

votes
2

answer
376

Views

CDI | Application / Dependent Scope | Memory Leak - javax.enterprise.inject.Instance<T> Not Garbage Collected

I am using Instance as a lazy / dynamic injector in a TomEE Java application, and I have noticed a memory leak in my application. This is a first for me, so it's actually surprising to see a memory leak warning that has been outlined in the Java EE Library : package javax.enterprise.inject; public i...
James
1

votes
1

answer
443

Views

Multiprocessing — Thread Pool Memory Leak?

I am observing memory usage that I cannot explain to myself. Below I provide a stripped down version of my actual code that still exhibits this behavior. The code is intended to accomplish the following: Read a text file in chunks of 1000 lines. Each line is a sentence. Split these 1000 sentences in...
lo tolmencre
1

votes
2

answer
138

Views

Memory Leak, but how can I pass a different context than the one of the activity to solve the Leak?

I have the following leak detected by LeakCanary where it appears that: GC ROOT android.hardware.fingerprint.FingerprintManager$1.this$0 (anonymous subclass of android.hardware.fingerprint.IFingerprintServiceReceiver$Stub) references android.hardware.fingerprint.FingerprintManager.mContext leaks com...
Drocchio
1

votes
2

answer
31

Views

Using Visual Studio Diagnostic Tool to investigate memory consumption/leak

In a WPF application I'm working on, I got the following memory-usage profile from Visual Studio Diagnostic Tools (see image below). So my program keeps allocating more and more memory until I get an OutOfMemoryException. I am new to VS Diagnostic Tools, so the question is: how do I use this window,...
heltonbiker
4

votes
4

answer
109

Views

C++ Dangling Pointers and Memory Leaks

I'm having a hard time understanding how to tell between dangling pointers and memory leaks. I have a few questions on a recent assignment that are puzzling me, and after reading into it, I am still puzzled. I don't want someone to do my homework for me, I want to be able to understand why something...
Vera
2

votes
1

answer
15

Views

pthread_created followed by pthread_join valgrind possible loss c

I've a problem with valgrind errors about loss memory. This is my code: if((err = pthread_create(&handlert, NULL, &handler, NULL)) != 0) perror(..) if((err = pthread_create(&mastert , NULL, &createmaster, NULL)) != 0) perror(..) for(int i = 0; i < THREADSINPOOL; i++) { if((err = pthread_create(&(f[i...
Elena Guidi
1

votes
1

answer
259

Views

JavaFX - Methods creating a new BooleanExpression cause memory leaks

I have just noticed that methods not(), and(), or() from both classes BooleanExpression and Bindings create a new BooleanExpression which probably stays in memory even if it does not have any reference. myBool = new SimpleBooleanProperty(); for (int i = 0; i < 10000000; i++) { myBool.not(); } Aforem...
dpelisek
1

votes
1

answer
329

Views

Does asynchronous code cause memory leaks?

I'm concerned if asynchronous operations are prone to memory leaks. My context is Javascript used both on the frontend as well as backend (node.js) On the execute operation, a delegate IResponder is created. It has the reference to the main module, as well as success and fault methods. The exampleM...
user2727195
10

votes
3

answer
324

Views

Can I have memory leaks if I'm not using new keyword?

I'm new to the language and I have a basic doubt about memory leaks. Is it possible to have a leak if I don't use the new keyword? (i.e having my variables in the stack and using data containers like std::vector) Should I worry about this issue? If that is the case, can someone give me an example...
MonkeyCoder
2

votes
1

answer
121

Views

IOSurface gradually increases memory in iOS 12 and above

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 cros...
Madhavan
5

votes
3

answer
42

Views

What is the “total count” metric in Android Studio's Memory Profiler?

I'm unable to find a description of this metric anywhere in the Android developer documentation. Here is a link to what I've most recently looked at: https://developer.android.com/studio/profile/memory-profiler Here's what I think it is: the number of objects in the heap that have not been deallocat...
Grant Park
1

votes
1

answer
1.1k

Views

WCF Message serialization leaking event handles and unmanaged memory

We have a WCF client and we need to save the request before we send it, however after every serialization there are some leaked windows event handles. We've tried windbg but the handles are created by the clr. Using sysinternals handles.exe reveals that Semaphores and Events are constantly increasin...
Boklucius
1

votes
1

answer
54

Views

What generation to look for when investigating a memory leak?

I doing my first investigating on a potential memory leak likely causing my server to halt. I see the following from the logs: ... 6676.590: [GC [PSYoungGen: 61432K->3902K(65408K)] 343313K->308460K(384896K), 0.0153165 secs] [Times: user=0.07 sys=0.10, real=0.02 secs] 6684.493: [GC [PSYoungGen: 6540...
Pomario
1

votes
2

answer
1.8k

Views

Garbage collection of static variables Java - out of memory

We have an application where we totally cache huge volume of data. The cache is maintained as static maps. Since the data is modified daily by some batch cycles, we refresh the cache after the data is modified. Refreshing cache is done by creating new objects and reference the static variable to t...
karthik2146
1

votes
2

answer
2k

Views

Squashing memory leak caused by using CGPathCreateCopyByTransforming and CGPathCreateCopy

I'm using ARC and a while loop to adjust several CGPathRefs until they fit within some constraints I have, and I need access to the paths once the conditions of the while loop are satisfied. Can someone explain how my code is leaking? The documentation for the CGCreateCopy... functions say they cr...
tobinjim
1

votes
3

answer
109

Views

Do I have to release object in Objective-C [duplicate]

Possible Duplicate: Understanding reference counting with Cocoa and Objective-C I'm little confused with memory leaking - when I have to release object, and when it will be released automatically in iOS, so please help me understood using following code. I have one method with following while block...
Alan 2012
1

votes
2

answer
348

Views

How to demonstrate memory leak and zombie objects in Xcode Instruments?

I would like to demonstrate memory leak and zombie object in Xcode Instruments on a class. I've found it pretty hard to trigger on purpose, especially with ARC turned on. Do you know how could I create them?
itarato
1

votes
3

answer
475

Views

Android/Java object not garbage collected

I am developing a simple pdf reader rewriting an existing example. My app has a custom view with two buttons next and previous. When the next button is clicked it downloads a pdf from the internet and shows it in the view. Each time the next or previous button is clicked the following showPdf() met...
sampath
1

votes
2

answer
2.1k

Views

Out of memory errors on orientation change

I have an app which uses an osmdroid mapactivity. Every time the screen orientation the heap size grows and after a couple of orientation changes I get the following errors: 12-12 00:53:08.990: E/dalvikvm-heap(6712): Out of memory on a 262160-byte allocation. 12-12 00:53:08.990: I/dalvikvm(6712): "f...
sam
1

votes
1

answer
936

Views

Memory leak in setInterval() method

I am creating a javascript based html dashboard. In order to refresh the values in the dashboard charts I have written the following code: var chart, options; function loadDynamicData() { var data = window.parent.getDynamicData(); var dataArray = data.split(','); for(var i = 0; i < chart...
manas
1

votes
1

answer
530

Views

'Memory Full' while transferring large file using QTcpSocket

I'm trying to transfer a large file in a non-blocking fashion, by connecting bytesWritten to my function sendNextBlock. void AsynchronousRetrieveCommand::start() { connect(socket(), SIGNAL(bytesWritten(qint64)), this, SLOT(sendNextBlock())); sendNextBlock(); } void AsynchronousRetrieveCommand::sendN...
sashoalm
1

votes
2

answer
485

Views

Valgrind has reported “memory leak” when I compiled my program with “-pg” enabled?

I've get a memory leak reported by Valgrind with -pg enabled when compiling the following simple code. #include #include #define BOOST_FILESYSTEM_VERSION 3 using boost::filesystem::path; using namespace std; int main() { path ptDir; ptDir = "/home/foo/bar"; if (true == is_directory((const path &)p...
macpaul
1

votes
2

answer
202

Views

iOS app memory leaks after doing Analyze in Xcode 4.5

I'm using Xcode 4.5.2 to practice iOS programming. My app seems to compile just fine, but when I do Product -> Analyze I get the following messages that are better illustrated in a I'd appreciate if someone could explain this to me? PS. I kinda understand what most that does, except the word __brid...
wolfrevokcats
1

votes
1

answer
405

Views

In VB6, do I need to call SysFreeString on strings allocated with SysAllocString?

I have a VB6 app which uses a C++ COM DLL and BSTRs are passed between the two. I return BSTRs from the C++ DLL with return ::SysAllocString(L"example");. Do I need to call SysFreeString on such a string in the following example? Sub Main() Dim own_str As String Dim dll_str As String own_str = "my o...
Felix Dombek
1

votes
3

answer
328

Views

Freeing memory in a function

I'm writing a simple program in C that finds anagrams of words based on looking them up in a hash table. What I have is an array of hash tables, where words are indexed by their length and hashed within by the summation of their letters, e.g. a = 1, b = 2, etc. I'm still getting acquainted with dyn...
Christian Benincasa
1

votes
1

answer
646

Views

Demystify Windbd memory usage labels: “Private Working Set” is large while memory is marked as RegionUsageFree

After a run, i see that my application takes 3.5Gb in TaskMgr What I see in Windbg is a little bit confusing: 0:022> !address -summary ProcessParametrs 0000000001b7ed70 in range 0000000001b7e000 0000000001b80000 Environment 0000000001c0c970 in range 0000000001c0c000 0000000001c0e000 ---------------...
vlg789
1

votes
2

answer
842

Views

Is this nodejs code a circular reference?

They are just a few lines from node.js official documents. client.on('data', function(data) { console.log(data.toString()); client.end(); }); I think client object has reference to the callback, the callback has a closure reference to client object. Is that correct? If yes, why is this encouraged?
Alvin Cao
1

votes
3

answer
385

Views

Image resize optimization causes memory usage to sky rocket

I made a function that takes an original image and resizes it to 3 different zoom scales -> 16x, 10x, and 4x. For a better understanding, continue reading this paragraph. Let's say the original image is 1000x1000. I declare that at 1x zoom it's dimensions will be 50x50. That means 4x zoom will b...
LampShade
1

votes
1

answer
114

Views

want to completely dealloc object's memory

In one controller I add other controller's view in the following way: objSecondController = nil; objSecondController = [[SecondController alloc]initWithNibName:@"SecondController" bundle:nil]; [self.view addSubview:objSecondController.view]; In view did load of objSecondController I do the following...
Vibhooti
1

votes
4

answer
162

Views

Java Memory leak for a old application [closed]

I encounter out of memory exception for an old java application that i am using, are there any tools that will help me figure out what part of the application is leading to out of memory exception? Most tools seem to be built for a web based java applications.. My application is not a web based app...
1

votes
2

answer
5.6k

Views

Tracking down a memory leak in a WCF Service

I have a WCF service that's currently hosted in IIS7 using .NET 4.0 in Classic mode. The service typically hums along between 250 and 400mb which is reasonable since the size of the database it's connected to is only about 300mb. Along with the memory usage the CPU usage stays between 0% and 15%. Th...
PorcupineRending
1

votes
1

answer
100

Views

Possible memory leak in webapp

In my webapp I create some DOM elements based on page fragments sent by the server. Any new fragment is a div with a unique ID generated within a jsp page. I think register for events on elements within this div using a script tag also sent as part of the page fragment. This is how my page fragment...
Rohit Banga
1

votes
2

answer
3k

Views

Understanding WinDbg report to findout memory leaks in .net

I know that my application is leaking memory & I used WinDbg tool to profile. I attached W3WP process and ran following command: !address –summary It generated following result. I want someone help me understand this result and guide me or provide me a link which in-turn will help me understand wh...
SharpCoder

View additional questions

Смотреть фильмы онлайн бабушка легкого поведения 2 фильм бесплатно