Top "Free" questions

Do not use this tag to refer to free software.

What is the correct way to dynamically create/release runtime forms?

I always try to create my Applications with memory usage in mind, if you dont need it then don't create …

delphi free dynamic destroy
Can I assume that calling realloc with a smaller size will free the remainder?

Let’s consider this very short snippet of code: #include <stdlib.h> int main() { char* a = malloc(20000); char* …

c malloc free realloc
Analyze valgrind output: "invalid free()"

I have this strange error found by valgrind on a (stupid) authentication module which makes some on heap allocations. ==8009== Invalid …

c free valgrind memcheck
cv::Mat's release method

I would like to confirm whether cv::Mat::release() method is similar to free() in C programming, i.e., its …

c++ opencv free mat
How does C free() work?

Possible Duplicate: How malloc() and free() work #include <stdio.h> #include <stdlib.h> int * alloc() { int *…

c memory-management free
strtok and memory leaks

I wrote a simple url parser using strtok(). here's the code #include <stdio.h> #include <stdlib.h&…

c memory free malloc strtok
Proper Way to Free Memory of a Returned Variable

I created a function designed to get user input. It requires that memory be allocated to the variable holding the …

c memory malloc free
Will malloc implementations return free-ed memory back to the system?

I have a long-living application with frequent memory allocation-deallocation. Will any malloc implementation return freed memory back to the system? …

free malloc glibc mmap tcmalloc
C free and struct

My question is about C free() function for deallocating memory blocks previously allocated with malloc(). If i have a struct …

c pointers data-structures free
Free memory allocated in a different function?

I'm trying to learn C and I'm currently trying to write a basic stack data structure, but I can't seem …

c pointers memory-management malloc free