Re: Problem with memory leaks

From: Fabian Schmied (REMOVETHISfabianDOTschmied_at_fhs-hagenbergDOTacDOTat)
Date: 05/17/04


Date: Mon, 17 May 2004 10:04:46 +0200

Rich [Microsoft Direct3D MVP] schrieb:
>>Well, I can't remember that I ever seen an application, which usesd for the
>>display of two boxes 200 MB (sorry, than I breaked, because of memory
>>shorting) in roaund about 3 Minutes, without a memory leak., It looks like
>>the applikaction would never end reserving memory. And I don't think that it
>>is normal for managed DirectX.
>
>
> Like I said, you don't seem to understand how .NET works. It will
> happily use a large amount of memory before it starts garbage
> collecting. Go read about how memory is managed in .NET before you
> start claiming its a leak. Particularly since .NET doesn't *let* you
> leak memory unless you're using #unsafe code blocks and an unmanaged
> memory allocator.

Well, it might not be a leak (because the GC reclaims it; still .NET
*lets* you leak memory in safe code, if you just keep references alive,
that's quite easy to do without wanting using events, btw), but 200MB in
three minutes just for displaying two cubes sure seems like a lot of
memory allocations. Looking at the samples, they eat a lot less memory.

Fabian



Relevant Pages

  • Re: A mailslot question
    ... because it _can_ leak memory, but to code it so that it ... _doesn't_ leak memory. ... So you prefer a design that can deadlock, but not directly leak, memory to ... you rejected the idea of a signal event for a shared buffer because it could ...
    (microsoft.public.win32.programmer.kernel)
  • RE: [PATCH] rfc4106, Intel, AES-NI: Dont leak memory in rfc4106_set_hash_subkey().
    ... Subject: rfc4106, Intel, AES-NI: Don't leak memory in rfc4106_set_hash_subkey. ... Collinstown Industrial Park, Leixlip, County Kildare ...
    (Linux-Kernel)
  • Re: Where my function leaks memory in IE?
    ... out the line that sets newImg to null and go back to your old method ... of creating a closure for the onclick handler and you will definitely ... all variables local and form a closure I avoid or don't avoid memory ... exiting this function, you will leak memory. ...
    (comp.lang.javascript)
  • Re: memory management
    ... Your question can be reformulated as "why does my program leak memory", ... > Task manager shows memory usage in KB and our program may not release KBs ... >> TaskManager measures the differences in the address space modifications ...
    (microsoft.public.win32.programmer.wmi)
  • Re: [PATCH/RFCv3 0/6] The Contiguous Memory Allocator framework
    ... this adds a new memory allocator implementation that steals ... completely different from the API for memory allocator. ... CMA adds notion of devices and memory ...
    (Linux-Kernel)