当前位置:网站首页>Using redis C library, the problem of asynchronous memory leakage
Using redis C library, the problem of asynchronous memory leakage
2022-07-27 03:56:00 【CSDN Q & A】
Use redis c library , The problem of asynchronous memory leakage
bool CPubLongConnect::Disconnect(){ if (p_redis_context) { // If you release it, you can't release it again if (!(p_redis_context->c.flags & REDIS_DISCONNECTING) && !(p_redis_context->c.flags & REDIS_FREEING)) { redisAsyncDisconnect(p_redis_context); //delete p_redis_context; } } if (p_event_base) { event_base_free(p_event_base); //delete p_event_base;; } //p_event_base = NULL; return true;}Code called on release , As shown in the above figure, there is memory growth in the call , If you don't comment out delete, be double free,
How can we solve this problem ?
边栏推荐
- Tool class of localdatetime sorted out by yourself
- 【安卓小叙】Kotlin多线程编程(一)
- Ring counting (Northern Polytechnic machine test questions) (day 83)
- flask_ Reqparse parser inheritance in restful
- 百融榕树数据分析拆解方法
- Realization of regular hexagon map with two-dimensional array of unity
- Permutation and binary (Ji, DA) (day 84)
- MySQL Chinese failure
- 768. 最多能完成排序的块 II 贪心
- 数字孪生实际应用:智慧城市项目建设解决方案
猜你喜欢

飞腾腾锐 D2000 荣获数字中国“十大硬核科技”奖

Introduction to database - a brief introduction to MySQL

MySQL中文失败问题

Plato farm brings a new experience to community users through the LAAS protocol elephant swap

函数指针与回调函数

Record the problem of PHP program accessing system files incorrectly

若依框架代码生成详解
![[Android synopsis] kotlin multithreaded programming (I)](/img/04/4349bacbd401868d73a3b05d018b66.png)
[Android synopsis] kotlin multithreaded programming (I)

The application and significance of digital twins are the main role and conceptual value of electric power.

Is Jiufang intelligent investment a regular company? Talk about Jiufang intelligent investment
随机推荐
若依框架代码生成详解
面试题:String类中三种实例化对象的区别
Maximum continuous subsequence (day 77)
Binary tree (Beijing University of Posts and Telecommunications machine test questions) (day85)
mysql如何优化
Plato farm is expected to further expand its ecosystem through elephant swap
FastBoot brush machine
J-3-point practice in the second game of 2022 Niuke multi school
基于OpenCV的轮廓检测(2)
复盘:图像有哪些基本属性?关于图像的知识你知道哪些?图像的参数有哪些
How can you access the domestic server and overseas server quickly with one database?
Ming min investment Qiu Huiming: behind the long-term excellence and excess, the test is the team's investment and research ability and the integrity of strategy
Contour detection based on OpenCV (1)
Number of square arrays (day 81)
MySQL中文失败问题
第六周复习
【安卓小叙】Kotlin多线程编程(一)
The application and significance of digital twins are the main role and conceptual value of electric power.
Banyan loan,
Debug mode in pycharm for detailed debugging