今天使用log4cplus在MFC调用时老发现关闭程序出现大面积的内存泄露。真操蛋,控制台没问题。

官方有人说是 微软工具检测的问题,并非内存泄露。

搜索一老外网页 http://stackoverflow.com/questions/696321/best-logging-framework-for-native-c

发现一老外的评论

I'm looking also for the same thing. So far I evaluated:

  • log4cplus - nice API, easy build, but memory leaks. The author does not care about the memory leaks and they will not be fixed I guess (see here)
  • log4cpp - nice API, easy build, but memory leaks
  • log4cxx - requires a bunch of apache stuff to get build (really annoyng until you build it) and at the end it has memory leaks... It is also very big
  • glog - so far version 0.3.0 - too early. Looks promesing though, but maybe later. It still has memory leaks, but it is small
  • ezlogger - cool nice small logging library. The only one without memory leaks! Unfortunately there are no features like configuration files, rolling logs e.t.c. Just logging, but works. It consists of several HPP files, so you just include them in your project. No need to build the whole world in order to work (Apache should learn from that!). The code looks nice, it has superb documentation, so anybody can extend it with whatever features in no time

I still want to look at Boost and the Pantheios, but I think ezlogger will be the tool of choice for me. Did I miss some library here? I'd like to make a complete list if possible.

真操蛋,5个日志库,4个微软检测内存泄露。那应该是微软的问题。唯一一个ezlogger轻量级的日志组件微软没报内存泄露。

试试去。微软的内存泄露检测工具太无语了。

转载于:https://www.cnblogs.com/kenter/archive/2011/09/05/2167201.html

log4cplus的内存泄露问题相关推荐

  1. Android中出现内存泄露的原因

    短生命周期的对象持有了长生命周期的对象,使得短生命周期对象驻留内存,消耗内存,因为无法让垃圾回收器GC验证这些对象是否不再被使用,无法释放这些内存. 以下会造成内存泄露: a.数据库的cursor没有 ...

  2. Linux下正确使用getifaddrs()函数避免内存泄露

    工作中使用valgrind检测内存泄露时,发现getifaddrs()很容易导致内存泄露,下面是正确的代码: //get local ip of network card //gcc -g get_a ...

  3. 使用valgrind检测ATS插件中的内存泄露

    一.内存错误出现的场景 这几天在重构ATS插件代码的过程中遇到了烦人的内存泄露问题, 周五周六连续两天通过走查代码的方法,未能看出明显的导致内存错误的代码, 同时也觉得C和C++混合编程得到一个动态库 ...

  4. 在Ubuntu 14.04 64bit上安装Valgrind并检查内存泄露

    valgrind官网:http://valgrind.org/ 1.安装方法 第一种方式:下载目前最新的源码,编译安装,在服务器上推荐这种方式 wget http://valgrind.org/dow ...

  5. ATS插件开发中内存泄露问题的解决方法探讨

    接触ATS开发已经有几年了,开发过内核的模块,也从事过插件的开发.内存泄露问题一直是一个困扰大多数ATS开发者的头疼的问题,下面说说我自己的感受和思考.这里这关注ATS插件开发这个话题.源码的exam ...

  6. 通过define _CRTDBG_MAP_ALLOC宏来检测windows上的code是否有内存泄露

    VS中自带了内存泄露检测工具,若要启用内存泄露检测,则在程序中包括以下语句: #define _CRTDBG_MAP_ALLOC #include <crtdbg.h> 它们的先后顺序不能 ...

  7. Ubuntu下内存泄露检测工具Valgrind的使用

    在VS中可以用VLD检测是否有内存泄露,可以参考http://blog.csdn.net/fengbingchun/article/details/44195959,下面介绍下Ubuntu中内存泄露检 ...

  8. OpenCV中的内存泄露问题(cvLoadImage,cvCloneImage)

    转自:http://apps.hi.baidu.com/share/detail/30893646 在做项目的过程中,使用OpenCV经常会出现一些内存泄露问题,自己编写的程序出现问题还情有可原,但若 ...

  9. python会不会出现内存泄露_Python内存泄漏和内存溢出的解决方案

    一.内存泄漏 像Java程序一样,虽然Python本身也有垃圾回收的功能,但是同样也会产生内存泄漏的问题. 对于一个用 python 实现的,长期运行的后台服务进程来说,如果内存持续增长,那么很可能是 ...

最新文章

  1. 蓝鸥Unity开发基础二——课时20 接口
  2. [Caffe]:关于*** Aborted at 1479432790 (unix time) try date -d @1479432790 错误的另一种原因
  3. maven修改setting文件后重启_Maven项目构建
  4. RxSwift之深入解析如何创建观察者Observer
  5. [转]在ROS下使用zeroconf配置多机通信
  6. [Leetcode][第632题][JAVA][最小区间][堆][滑动窗口]
  7. python 列表写入csv_Python将字典数据写入CSV文件
  8. 安全攻击层出不穷,绿盟科技“智慧安全 3.0”安全防护再升级
  9. 组策略查看login记录_k8s实践记录(五)
  10. 梭织布印染后整理瑕疵最全解读
  11. 【渝粤题库】陕西师范大学800008 综合自然地理
  12. 用python处理excel视频教程_从零基础开始用Python处理Excel数据(第一季)课件+资料...
  13. 计算机怎么格式化硬盘,电脑格式化硬盘 电脑格式化硬盘要怎么操作
  14. 探秘手机距离传感器工作背后的那些事儿
  15. win10下安装cuda和cudnn
  16. 在 cfx-solver 的 monitor 中'normal force' 与 'tangential force' ,'normal momen' 与 'tangential moment' 意义
  17. 2021-2025年中国健身训练软件行业市场供需与战略研究报告
  18. 如何在51单片机实现电子万年历
  19. 智能镜——7.化妆灯和人体感应篇
  20. 各种科学计算软件科普

热门文章

  1. PLSQL Developer概念学习系列之如何正确登录连接上Oracle(图文详解)
  2. redis 入门教程
  3. Python基础第19天
  4. hibernate EJBQL QBC QBE
  5. 11g compression 新特性(1)
  6. 阿里云文件存储NAS跨账号挂载
  7. 400 错误,因为url编码问题
  8. TypeScript基础入门 - 泛型 - 泛型类型
  9. java开发环境搭建(重点)
  10. shell高级(一)