Skip to content

I hope this helps ease your headache of getting and freeing heap pointers, file descriptors, etc..

License

Notifications You must be signed in to change notification settings

nothingIIersonal/xcleanup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

xcleanup

I hope this helps ease your headache of getting and freeing heap pointers, file descriptors, etc, before exit.
Too bad there's no RAII, but we do have atexit(). Thanks for that at least...

Usage

Include <xcleanup.h> in your project. An example of use can be found in the main.c. Build with clang/gcc.

To build an example (unix), type:

mkdir .build
cd .build
cmake ..
cmake --build .

On Windows, for example, you can use nmake:

mkdir .build
cd .build
cmake .. -G"NMake Makefiles" -DCMAKE_C_COMPILER=clang
nmake

To leak-check (unix), type:

cmake --build . --target leak-check

About

I hope this helps ease your headache of getting and freeing heap pointers, file descriptors, etc..

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published