How to trace problem Memory leak ? 
Author Message
 How to trace problem Memory leak ?

Hi,
check MSDN article
Detecting and Isolating Memory Leaks Using Microsoft Visual C++
by Edward Wright

Regards,
Eugene

Quote:
> Hello
>         I've tried to debug memory leak problem but I can't find it.
>        Have anyway to debug it easier ???

> Thanks

Sent via Deja.com http://www.*-*-*.com/
Before you buy.


Sun, 14 Jul 2002 03:00:00 GMT  
 How to trace problem Memory leak ?
Kobe:

If you run under the de{*filter*}, then the memory leaks appear in the
output window when you exit the program. You probably have to scroll
down to see them. The output specifies where in your code you created
the memory which is leaking (click on the leak, and you will be taken to
the line in the code).

HTH,

David Wilkinson

==================

Quote:

> Hello
>         I've tried to debug memory leak problem but I can't find it.
>        Have anyway to debug it easier ???

> Thanks



Sun, 14 Jul 2002 03:00:00 GMT  
 How to trace problem Memory leak ?
Hello
        I've tried to debug memory leak problem but I can't find it.
       Have anyway to debug it easier ???

Thanks



Mon, 15 Jul 2002 03:00:00 GMT  
 How to trace problem Memory leak ?

Hi David
        Thanks for your suggestion. When I'm clicking  it wil open
strcore.cpp  and I can't open it
  I think it is a file of VC++.
        How I resolve this ?

Thanks again



Mon, 15 Jul 2002 03:00:00 GMT  
 How to trace problem Memory leak ?
strcore.cpp is the implementation of CString.  Did you not install the MFC
source code when you installed VC++?


Mon, 15 Jul 2002 03:00:00 GMT  
 How to trace problem Memory leak ?


Fri, 19 Jun 1992 00:00:00 GMT  
 How to trace problem Memory leak ?
Hello Scot
         Is it possible ? I don't use any CString as pointer in my program.
        Any sugesstion ?

Thanks for your help

Quote:

> strcore.cpp is the implementation of CString.  Did you not install the MFC
> source code when you installed VC++?



Tue, 16 Jul 2002 03:00:00 GMT  
 How to trace problem Memory leak ?
If you use any CStrings at all, the CString class uses pointers internally.
Even if you don't use CStrings directly, it is likely that one of the MFC
classes you use is using a CString or two.


Tue, 16 Jul 2002 03:00:00 GMT  
 How to trace problem Memory leak ?
Hi
       Would you mind if I ask you about CString ?

      My program has many functions and its pass parameter like this

    void  func1(CString x);
    void func2(const CString& x);

            I have to know what the different of both method ? and it related
Memory leak problem or not ?

   Thanks a lot

Quote:

> If you use any CStrings at all, the CString class uses pointers internally.
> Even if you don't use CStrings directly, it is likely that one of the MFC
> classes you use is using a CString or two.



Tue, 16 Jul 2002 03:00:00 GMT  
 How to trace problem Memory leak ?
I don't know if it is related to your memory leak, but I'll explain the
difference between parameter "CString" and parameter "const CString &".
When the parameter is CString, the CString copy constructor is called, and a new,
temporary CString object is created for the duration of the function call, but
with the same text as the argument passed in.  In this case, you can call the
function with any expression that a CString constructor can accept, including a
constant string expression. If a CString is used when calling the function, the
buffer is reused for the sake of efficiency, and the reference count is increased
until the function ends.  If you modify the parameter, the buffer is copied to
avoid changing the original.

When the parameter is "const CString &", a copy is not made. The argument passed
in must be a real CString object, because it will be used directly.  The
reference count is not increased.  Since it is a constant parameter, it cannot be
modified in the body of the function. Because the original is used without making
a copy, this type of function call is a bit faster.



Tue, 16 Jul 2002 03:00:00 GMT  
 
 [ 10 post ] 

 Relevant Pages 

1. Any good ways to trace memory leaks?

2. tracing memory leaks

3. Tracing memory leaks

4. Tracking memory leaks and debugging memory problems

5. Handle leak, memory leak...

6. Memory leak problem

7. Problem with file read, might be a memory leak

8. ibm example, memory leak problem.

9. Memory leak problem in C?

10. Memory leak problem

11. COM Release problem and Memory Leak

12. CRT memory leak problem

 

 
Powered by phpBB® Forum Software