更新时间:2023-02-26 15:24:22
冒着被 glib 的风险,你有内存泄漏.为什么不试试像 ANTS* 这样的工具来追踪它.他们有免费试用版,我没用过,但口碑不错.
At the risk of being glib, you have a memory leak. Why not try a tool like ANTS* to track it down. They have a free trial, I've never used it but it has a good reputation.
*其他分析工具可用.
如果您不想使用其他工具,可以尝试在每次创建类时增加静态成员并在每次释放实例时减少它.这将帮助您追踪未正确销毁的实例.
If you don't want to get to grips with another tool, you can try something like incrementing a static member every time a class is created and decrementing it every time an instance is disposed. This will help you track down instances that are not be destroyed properly.