Is there a memory leak in the following code example as I have allocated memory on the heap fo开发者_如何学编程r name which hasn\'t been freed? If I add free(person->name); before the free(person); li
I have an array that is passed via a function and assigned to a class member which is a pointer. class ClassA{
I don\'t understand why, in this code, the call to \"free\" cause a segmentation fault: #include <stdio.h>
【free】Kick 开发者_如何学JAVACu 专辑:“808” 语种:国语 流派: Rap/Hip Hop 唱片公司:独立发行
gcc 4.4.4 c89 I have the following function but I cannot free the memory. The message I get in Valgrind is suspecting the getline function. However, I am free the file pointer at the end of the funct
I\'ve finished my NPAPI plug-in and it works great in Google Chrome but there\'s a strange problem. The problem is that I\'ve coded a method in the plug-in that returns a string to the browser. In ord
This question already has answers here: Closed 12 years ago. Possible Duplicate: Is there any danger in calling free() or delete instead of delete[]?
I am trying to use putenv() on UNIX by concatenating str1 and str2 before that. I want to add a variable, or modify a variable, in the environment, so I am calling putenv() (or I could call setenv() i
I\'m using Delphi (7-2010) and trying to figure out a good way to handle exceptions while freeing forms of an application.The application has several forms that are owned by the Application object.Whe
I have a c++ class with a member that is a string, something like: class Phone { string name; void foo()