Solved

Tracing memory leaks (using LeakTracer)

Posted on 2003-11-19
3
360 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
Update (December 2011): Since this article was published, the things have changed for good for Android native developers. The Sequoyah Project (http://www.eclipse.org/sequoyah/) automates most of the tasks discussed in this article. You can even fin…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

695 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