|
From: Sanjay K. (sanjaku5) <san...@ci...> - 2013-06-25 07:43:22
|
Hi All,
Can anyone tell me why valgrind hit "__static_initialization_and_destruction_0(int, int) ?
How to resolved I ?
Valgrind trace report of memory leak:
==26345== 22 bytes in 1 blocks are possibly lost in loss record 2,523 of 15,823
==26345== at 0x401DE8F: operator new(unsigned int) (vg_replace_malloc.c:292)
==26345== by 0x40BCE46: std::string::_Rep::_S_create(unsigned int, unsigned int, std::allocator<char> const&) (new_allocator.h:88)
==26345== by 0x40BEA68: std::string::_M_mutate(unsigned int, unsigned int, unsigned int) (basic_string.tcc:460)
==26345== by 0x40BEBE9: std::string::_M_replace_safe(unsigned int, unsigned int, char const*, unsigned int) (basic_string.tcc:665)
==26345== by 0x40BEC81: std::string::assign(char const*, unsigned int) (basic_string.tcc:268)
==26345== by 0x40BEDFA: std::string::operator=(char const*) (char_traits.h:257)
==26345== by 0x878D63E: diameter::diameter_initialize() (diameter.cpp:2445)
==26345== by 0x87E78BC: diameter::diameter_entity::diameter_entity() (diameter_entity.cpp:10)
==26345== by 0x8152727: __static_initialization_and_destruction_0(int, int) (flare_app.cpp:88)
==26345== by 0x8152907: global constructors keyed to user_ent (flare_app.cpp:8495)
==26345== by 0x89F7DEA: ??? (in /usr/local/flare/flare)
==26345== by 0x804C3A0: ??? (in /usr/local/flare/flare)
Thanks,
Sanjay
|
|
From: <pa...@fr...> - 2013-06-25 08:01:59
|
----- Original Message ----- > Hi All, > > Can anyone tell me why valgrind hit > “__static_initialization_and_destruction_0(int, int) ? My guess is that you have one of the forms of static (file static, class static or function static). > How to resolved I ? Normally objects that were statically constructed get destroyed in reverse order upon program termination. My guess is that you are allocating something in your constructor that is not deleted in the destructor. A+ Paul |