标签:内存泄漏

关于智能指针内存泄漏的一点点疑问

其实,本人只是想不懂这程序为啥会内存泄漏,本人单步过了,知道是哪一句导致的,但是想不懂。 // fg.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include<string>   #include<iostream&……

strdup()作为其他函数的入参会导致内存泄漏么

正常strdup()总是与free()成对出现,如 char *a = strdup(b); free(a); 假如strdup(b)没有赋值给一个指针,而是作为其他函数的入参呢,如 char *a = functionA( strdup(b), c ); 这种情况下,strdup(b)申请的内存没有被free(),是不是就内存泄漏了? 求指导~~ 解决方案……

使用属性动画不停旋转图片的时候出现内存泄漏,帮助该怎么解决

下面是出现泄漏的代码片段,help! private void initTurntalbeAnim() {         final View v = mTurntableLayout;         final float centerX = mContext.getResources().getDimension(R.dimen.turntable_……