0

我一直在尝试分析执行批量代码时发生的泄漏。在 dbx 中发现了泄漏,泄漏如下所示。

  Total     Num of  Leaked     Allocation call stack
  Size      Blocks  Block
                    Address
==========  ====== =========== =======================================

272033    4431      -      operator new < std::basic_string<char,std::char_traits<char>,std::allocator<char> >::__getRep < std::basic_string<char,std::char_traits<char>,std::allocator<char> >::replace

有没有人遇到过这种类型的泄漏。是否可以使用 DBX 注释分析泄漏。因为它是一个巨大的代码,所以代码中泄漏的位置很难

4

2 回答 2

1

I would try running the app with libumem which helps in identifying memory management issues.

Even though the codebase is huge, you may be able to work this out via targeted code review.

于 2012-05-02T11:06:44.697 回答
0

在线快速检查发现此问题与您所看到的相似。不过它已经很老了-您使用的是什么编译器版本?

如果是同样的问题,并且不可能进行完全升级,那么您的困难将是隔离调用该代码的位置并对其进行重新处理以防止它发生。

于 2012-05-03T11:45:50.737 回答