Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

存在内存泄露问题 #40

Closed
molixiaoge opened this issue Jun 6, 2016 · 3 comments
Closed

存在内存泄露问题 #40

molixiaoge opened this issue Jun 6, 2016 · 3 comments

Comments

@molixiaoge
Copy link

valgrind测试存在内存泄露,makeLogData 内存没有释放,测试代码如下:

  1. ILog4zManager::getRef().start();
  2. LOGD("stream input *** " <<1 );
@zsummer
Copy link
Owner

zsummer commented Jun 6, 2016

为了提高性能, 会缓存不高于200个被释放的LogData来复用, 相当于对象池.

@molixiaoge
Copy link
Author

恩,看到了小于200的判断,但是main函数结束了,对象析构函数并未做delete处理...,虽然说程序都已经结束了。

@zsummer
Copy link
Owner

zsummer commented Jun 6, 2016

可以少写一部分代码.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants