I need 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 CreateBitmapSourceFromBitmap is called repeatedly the memory goes up and ...
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 since it will disguise "genuine" leaks that...
hello all,
is there any good tutorial/link on how to use instruments while debugging, especially for memory leaks?
Thanks
...
gah..!! Forgot basics...some how this free is not working, i ran program on windows and followed memory usage using task manager, which didn't show any reduction in memory usage after free statement.
#include <cstdlib>
#include <iostream>
using namespace std;
int main(int argc, char *argv[])
{
int i=0,j,k;
char **ptr;
ptr...
Hi there! 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 huge leak a start of the project...
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 Internet Explorer. Is it how it works? Or did ...
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)
{
resource = IDB_BITMAP1;
}
else
{
resource =...
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 reference count 1, I didn't care to call autore...
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 of winmain I added
_CrtDumpMemoryLeaks();
Unfortu...
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 shared.
The memory is leaking.
There are...
Hello All I have apache 2.0.53 with mod_fast cgi enabled .We have not more than 100 concurrent users every day but still my apache has memory leak problems and it uses 8Gb of ram within 3 days and starts using swap memory which irritates users in the mid of third day and i have to restart apache that day. I have 8GB of Ram , dual core in...
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 using memory_get_usage(), until it reaches ...
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
//when we copy b[i] into a[i] do we loose
//the reference...
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 propose me a good tutorial to understand ...
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 stays constant. I specifically make sure in...
Hello,
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 *data = [ NSURLConnection sendSynchrono...
Hi all,
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.
...
i am trying to launch a view from a button. When I do it causes a memory link but I can see why.
CamViewController *dvController = [[CamViewController alloc] initWithNibName:@"Cam_View" bundle:[NSBundle mainBundle]];
dvController.camType = 1;
[self.navigationController pushViewController:dvController animated:YES];
[dvController relea...
I've just completed my first simple iPhone app; I'm using Instruments to find memory leaks.
I am a little lost as to how to reuse pointers. I have read the Apple documentation, but I still don't understand the correct procedure.
The Apple docs say, "Another typical memory leak example occurs when a developer allocates memory, assigns ...
I have an application that is built in C# .NET. It uses excel as a presentation layer and unmanged C++ as a processing engine. Is there a tool I can use to check for memory leaks for each component?
...