Solved

Tracing memory leaks (using LeakTracer)

Posted on 2003-11-19
3
341 Views
Last Modified: 2013-12-14
Hello, I'm trying to patch up some memory leaks in my program using LeakTracer, but I still don't quite understand where the largest one is coming from.

This is kind of a shot in the dark, I guess, but have any of you used LeakTracer a lot? Where would you start looking if you got output like the one here? I don't have any string iterators in my program that I'm aware of. What does this mean?

#-- Leak: counted 74x / total Size: 3313520
During symbol reading, struct/union type gets multiply defined: struct __normal_
iterator<char*,std::basic_string<char, std::char_traits<char>, std::allocator<ch
ar> > >.
During symbol reading, struct/union type gets multiply defined: struct __normal_
iterator<const char*,std::basic_string<char, std::char_traits<char>, std::alloca
tor<char> > >.
0x43222d is at /usr/include/c++/3.2/bits/char_traits.h:147.
146           copy(char_type* __s1, const char_type* __s2, size_t __n)
147           {  return static_cast<char_type*>(memcpy(__s1, __s2, __n)); }
0
Comment
Question by:loveslave
3 Comments
 
LVL 13

Accepted Solution

by:
SteH earned 250 total points
ID: 9785332
Start with the leaks in your code. This one is comming from STL which is pretty well tested. I guess that you have a class/struct object which is not released and has a string member inside. With deleting your object the string will be released as well. Thus both leaks disappear at the same time.
0
 
LVL 9

Expert Comment

by:tinchos
ID: 10249312
No comment has been added lately, so it's time to clean up this TA.
I will leave the following recommendation for this question in the Cleanup topic area:

Accept: SteH {http:#9785332}

Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

Tinchos
EE Cleanup Volunteer
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
Programmer's Notepad is, one of the best free text editing tools available, simply because the developers appear to have second-guessed every weird problem or issue a programmer is likely to run into. One of these problems is selecting and deleti…
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now