1
голосов
3ответов
2614 просмотров

NSAutorelease memory leak

I am getting this error message in the console: *** _NSAutoreleaseNoPool(): Object 0x10d2e0 of class NSPathStore2 autoreleased with no pool in place - just leaking I can't figure out what is the error? Thanks.

9
голосов
4ответов
6019 просмотров

NSXMLParser Leaking

I have the following code that leaks. Instruments says that it is the rssParser object that is leaking. I "refresh" the XML feed and it runs the block and it leaks.... file.h @interface TestAppDelegate : NSObject <UIApplicationDelegate> { NSXMLParser *rssParser; } file.m NSData...

17
голосов
6ответов
9770 просмотров

What causes a JRE 6 JVM code cache leak?

Since switching to JRE 6, my server's code cache usage (non-heap) keeps growing indefinitely. My application creates a lot of classes at runtime, BUT these classes are successfully unloaded during the GC process. I can see these classes getting unloaded in the gc logs and also the permGen usage s...

0
голосов
2ответов
1387 просмотров

Java deque / prepared statement memory leak

One of the following pieces of code generates a memory leak, any idea which part? 1) private Deque<Snapshot> snapshots = new LinkedList<Snapshot>(); Iterator<Snapshot> i = world.getSnapshots().descendingIterator(); while (i.hasNext()) { Snapshot s = i.next(); ...

-1
голосов
1ответов
821 просмотров

Tutorial about objective-c garbage collection

I would like to understand garbage collection in objective-c. I know how to work with memory in C-like languages and in languages where I don't care about memory. But I don't understand when to use autorelease, retain, dealloc and everything else, so I get errors and memory leaks. Could someone...

1
голосов
5ответов
1007 просмотров

Does copying the content of one array to another cause a memory leak

Does this code cause a memory leak: int main(){ int * a = new int[10]; int * b = new int[10]; for(int i = 0 ; i < 10; i++) { a[i] = 1; b[i] = 1; } for(int i = 0 ; i < 10; i++) { a[i] = b[i]; //each a[i] is allocated 4 bytes on heap ...

0
голосов
3ответов
336 просмотров

Memory leak in transition from PHP 4 to 5 - any hints?

I am porting a large web application to a shared web hosting environment. The app was written in PHP 4. The new environment has PHP 5.2. For some reason, the application is leaking tremendous amounts of memory when running in PHP 5.2. I can literally watch memory usage going through the roof u...

0
голосов
1ответов
225 просмотров

Can I measure memory taken by mod_perl?

Problem: my mod_perl leaks and I cannot control it. I run mod_perl script under Ubuntu (production code). Usually there are 8-10 script instances running concurrently. According to Unix "top" utilty each instance takes 55M of memory. 55M is a lot, but I was told here that most of this memory is...

9
голосов
2ответов
9834 просмотров

Visual Studio 2008 (C++) memory leak detection not showing file/method location - how to get that to work?

I am using the instructions found here to try to find memory leaks in a Win32 application. As described, I put the #define _CRTDBG_MAP_ALLOC #include <stdlib.h> #include <crtdbg.h> Lines at the top of a file (the cpp file that contains WINAPI _tWinMain) and then at the exit point...

1
голосов
1ответов
59 просмотров

Is leaking objects considered OK in Testing Scenarios?

I have written some Objective-C test cases. A typical looks the following: - (void) test_size_Equals_Excpectation_After_initWithSize { int size = 10; Buffer* buff = [[Buffer alloc] initWithSize:size]; GHAssertEquals([buff size], size, nil); } Buffer alloc returns buffer with refer...

0
голосов
2ответов
718 просмотров

Why does my PictureBox loading routine leak memory?

I've been trying to swap images in a PictureBox in a C++/CLI application but my solution appears to have a memory leak: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) { // Pick a new bitmap static int resource = IDB_BITMAP1; if( resource == IDB_BITMAP2) ...

0
голосов
1ответов
799 просмотров

Destroy SWF DOM in swfupload

I am using swfupload for uploading files and I have this problem: In Internet Explorer, I have to use destroy(). Otherwise it crashes http://demo.swfupload.org/Documentation/#destroy In Firefox, if I use destroy(), it crashes. So the solution is to detect browser type and only destroy in Inte...

2
голосов
1ответов
837 просмотров

Can't fix Severe Memory Leak from Open AL

I'm nearing the end of a big iPhone project and whilst checking for memory leaks stumbled on this huge one. I implemented the sound following this tutorial: http://www.gehacktes.net/2009/03/iphone-programming-part-6-multiple-sounds-with-openal/ Works a charm, a lot of people use it but I get a ...

2
голосов
3ответов
405 просмотров

Memory usage isn't decreasing when using free?

Somehow this call to free() is not working. I ran this application on Windows and followed the memory using in Task Manager, but saw no reduction in memory usage after the call to free(). int main(int argc, char *argv[]) { int i=0; int *ptr; ptr = (int*) malloc(sizeof(int) * 1000); ...

4
голосов
1ответов
2319 просмотров

How to disable visual C++ memory leak checking for a particular file?

One of my projects is making use of Microsoft's supplied memory leak checker via _CrtSetDbgFlag etc. This is working fine except that I now want to make use of a third-party package which is leaking a small amount of memory. I have no particular need to fix the leaks, but the output is annoying s...

49
голосов
6ответов
28287 просмотров

WPF CreateBitmapSourceFromHBitmap() memory leak

I need to draw an image pixel by pixel and display it inside a WPF. I am attempting to do this by using a System.Drawing.Bitmap then using CreateBitmapSourceFromHBitmap() to create a BitmapSource for a WPF Image control. I have a memory leak somewhere because when the CreateBitmapSourceFromBitm...

0
голосов
1ответов
864 просмотров

ARM/Linux memory leak: Can a user program retain memory after terminating?

I've got a memory leak somewhere, but it doesn't appear to be related to my program. I'm making this bold statement based on the fact that once my program terminates, either by seg-faulting, exitting, or aborting, the memory isn't recovered. If my program were the culprit, I would assume the MM...

2
голосов
1ответов
1142 просмотров

Linux BASH memory leak when redirecting stdio

I've got a memory leak somewhere, but it doesn't appear to be related to my program. I'm making this bold statement based on the fact that once my program terminates, either by normal means, seg-faulting, or aborting, the memory isn't recovered. If my program were the culprit, I would assume th...

3
голосов
4ответов
7271 просмотров

How can I find out how much memory my c++ app is using on the Mac

Certain operations in my app are using more memory than I think they should, and I would like to log the current memory usage to help identify which they are. Is there a system call that will return the amount of memory currently in use?

13
голосов
3ответов
10214 просмотров

Memory leak reported by valgrind in dlopen?

I've been debugging some app lately with valgrind, and I'm getting very weird reports from dlopen. ==1987== 32 bytes in 1 blocks are still reachable in loss record 1 of 2 ==1987== at 0x4C24477: calloc (vg_replace_malloc.c:418) ==1987== by 0x570F31F: _dlerror_run (dlerror.c:142) ==1987== ...

0
голосов
1ответов
221 просмотров

How to ensure no memory leak for Objective-C class that is called by many other class

I have the following controller class which will do different tasks based on combination of the flag and param property. The value of these two properties will be set by many other classes having a reference to this controller. The question is how does each of the calling class assign value and w...

2
голосов
2ответов
538 просмотров

How can I get valgrind to tell me the address of each non-freed block of memory?

Valgrind tells me function xxx allocated memory which was not freed. Fine. It's proving more difficult than usual to trace however. To this end I have created numerous: #ifdef DEBUG fprintf(stderr, "something happening:%lx\n", (unsigned long)ptr); #endif So I just need to match these ptr addr...

2
голосов
1ответов
928 просмотров

Instruments showing false leak?

I am not sure why Instruments is showing the following code as leaking 128 bytes on the UILabel initWithFrame line: self.navigationItem.leftBarButtonItem = self.editButtonItem; UILabel *tmp = [[UILabel alloc] initWithFrame:CGRectMake(25, 100, 275, 100)]; self.emptyMsg = tmp; [tmp release]; No...

1
голосов
4ответов
820 просмотров

How to determine free memory within a program running on Linux?

I've got a software running on Linux that is leaking memory. It's an embedded system so I don't have a lot of debugging tools so I'm using printf's. Short of doing something like 'popen()'ing a call to 'cat /proc/meminfo' and scanning for the MemFree line, is there a way I can put this informat...

0
голосов
5ответов
547 просмотров

Trouble Finding a Memory Leak

Hey everyone, i am having trouble finding a memory leak. all off my retain counts = 0 when i dealloc them but still I am flagging up a leak from the following bit of code: - (GKSession *) peerPickerController:(GKPeerPickerController *)picker sessionForConnectionType:(GKPeerPickerConnectionType)t...

14
голосов
5ответов
35825 просмотров

There is insufficient system memory in resource pool 'internal'

SQL Server 2008 Linked Server and ad-hoc INSERTs cause a rapid memory leak which eventually causes the server to become non-responsive and ends with the following error: Msg 701, Level 17, State 123, Server BRECK-PC\SQLEXPRESS, Line 2 There is insufficient system memory in resource pool 'interna...

8
голосов
2ответов
12137 просмотров

JNI Freeing Memory to Avoid Memory Leak

So i have this C++ program that is called via JNI from my Java program, the code follows: JNIEXPORT jstring JNICALL Java_com_entrust_adminservices_urs_examples_authn_LdapAuthenticator2_takeInfo(JNIEnv *env, jobject obj, jstring domain, jstring id, jstring idca, jstring password) { const...

2
голосов
5ответов
1022 просмотров

iPhone Memory Leaks in Apple's Code

I'm running leaks through Instruments on my iPhone app and I'm seeing a lot of leaks that don't appear to be coming from my code. For example: NSURLConnection *connection = [[NSURLConnection alloc] initWithRequest:request delegate:...

8
голосов
9ответов
1602 просмотров

How do you program safely outside of a managed code environment?

If you are someone who programs in C or C++, without the managed-language benefits of memory management, type checking or buffer overrun protection, using pointer arithmetic, how do you make sure that your programs are safe? Do you use a lot of unit tests, or are you just a cautious coder? Do y...

2
голосов
4ответов
2255 просмотров

iPhone CGRectMake memory consuption

On iPhone.. Why would code such as this cause memory leak? after 2 minutes the net bytes have doubled. All I'm doing is moving a ball round the screen with an NSTimer calling the below method. Any ideas? - (void)nextFrame:(NSNotification *)notification { ballInstance.frame = CGRectMake(valu...