-
June 3rd, 2006, 05:24 AM
#1
Finding memory leaks
can we efficiently find the memory leaks through task manager?
is it a good way?
thanks a lot
RaviKishore.
-
June 3rd, 2006, 07:00 AM
#2
Re: Finding memory leaks
can we efficiently find the memory leaks through task manager?
is it a good way?
Well, there are probably better solutions. But, both the Task Manager and the Performance Monitor will help you a great deal with finding memory and resource (handles, gdi etc.) leaks.
- petter
-
June 4th, 2006, 04:25 AM
#3
Re: Finding memory leaks
I've heard that both firefox and opera have memory leaks.
I used both programs and i do agree that sometimes too many tabs are open at the same time, the memory will spike to the top.
Anyone have the same experience with me or am the only one?
What actually causes memory leaks?
From what i know: using malloc() without ending it with free()
Any other causes?
-
June 4th, 2006, 05:54 AM
#4
Re: Finding memory leaks
Here are few combinations:
- malloc - free
- new - delete
- VirtualAlloc - VirtualFree
- HeapAlloc - HeapFree
- LocalAlloc - LocalFree
- GlobalAlloc - GlobalFree
-
June 4th, 2006, 07:33 AM
#5
Re: Finding memory leaks
Improper use of constructors and destructors
Emiene Vous
-
June 4th, 2006, 02:00 PM
#6
Re: Finding memory leaks
Originally Posted by Emiene
Improper use of constructors and destructors
Can you give a single example for CTOR/DTOR implications, without putting the memory allocation/de-allocation stuff??
-
June 5th, 2006, 12:11 AM
#7
Re: Finding memory leaks
Originally Posted by Ajay Vijay
Here are few combinations:[*]new - delete
Can you show me how can this cause a problem?
I have some experience with Java, and the "new" is used for defining new objects of a class. I think it is used for the same purpose in Visual C++ (correct me if i'm wrong). But in Java, i never see the need to "delete" after "new". Is it because Java does garbage collection and cleanup by itself while visual C++ doesn't?
-
June 5th, 2006, 09:59 AM
#8
Re: Finding memory leaks
I have some experience with Java, and the "new" is used for defining new objects of a class. I think it is used for the same purpose in Visual C++ (correct me if i'm wrong). But in Java, i never see the need to "delete" after "new". Is it because Java does garbage collection and cleanup by itself while visual C++ doesn't?
Absolutely. Java has its Runtime environment called JVM.
C++ does NOT have anything as such. The runtime environment is the OS (unless it is attached to debugger, in that case Debugger is actually RTE).
You have to delete the memory yourself. This is one of the reason why C/C++ gives manifold performance over Java and other "runtime needed" languages like C#, VB.NET etc.
You'll find thousands of articles on the Internet about Java and C++ differences.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|