当前位置:网站首页>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 ?
边栏推荐
- Practical application of digital twins: smart city project construction solution
- Textbox in easyUI inserts content at the cursor position
- Permutation and binary (Ji, DA) (day 84)
- flink cdc 到MySQL8没问题,到MySQL5读有问题,怎么办?
- Design method and test method of APP interface use case
- Learning and understanding of four special data types of redis
- Characteristics and experimental suggestions of abbkine abfluor 488 cell apoptosis detection kit
- DataX无法连接对应的数据库(windows下可以,linux下失败)
- Director of meta quest content ecology talks about the original intention of APP lab design
- The application and significance of digital twins are the main role and conceptual value of electric power.
猜你喜欢

Briefly sort out the dualpivotquicksort

Introduction to redis

Digital analog 1232

【无标题】JDBC连接数据库读超时

Double disk: the main differences between DFS and BFS, the differences in ideology, and the differences in code implementation

Is Jiufang intelligent investment a regular company? Talk about Jiufang intelligent investment
![Machine learning [Matplotlib]](/img/d1/31ec2f96ca96465c6863798c7db179.jpg)
Machine learning [Matplotlib]

Connman introduction

代码回滚,你真的理解吗?
![[untitled] JDBC connection database read timeout](/img/24/726ed8b3419866244a1b69e6485d7c.png)
[untitled] JDBC connection database read timeout
随机推荐
关于使用hyperbeach出现/bin/sh: 1: packr2: not found的解决方案
Cocos game practice-05-npc and character attack logic
Design method and test method of APP interface use case
Vector to SVG method
Prime factorization -- C (GCC) -- PTA
Plato Farm有望通过Elephant Swap,进一步向外拓展生态
大家有遇到CDC读MySQL字段不全的情况吗?怎么处理的?
Duplicate disc: what are the basic attributes of an image? What do you know about images? What are the parameters of the image
About the solution of using hyperbeach to appear /bin/sh: 1: packr2: not found
Banyan loan,
How can you access the domestic server and overseas server quickly with one database?
MySQL中文失败问题
使用redis c库,异步内存泄露的问题
Use websocket to realize a web version of chat room (fishing is more hidden)
深圳家具展首日,金可儿展位三大看点全解锁!
mysql如何优化
Principle understanding and application of hash table and consistent hash
How to conduct 360 assessment
Binary tree (day 82)
The new version of Alibaba Seata finally solves the idempotence, suspension and empty rollback problems of TCC mode