In C With GCC Extensions
The GNU Compiler Collection's C compiler comes with 2 extensions that allow to implement destructors:
- the "destructor" function attribute allows defining global prioritized destructor functions: when main returns, these functions are called in priority order before the process terminates. See also
- the "cleanup" variable attribute allows attaching a destructor function to a variable: the function is called when the variable goes out of scope.
Read more about this topic: Destructor (computer Programming)
Famous quotes containing the word extensions:
“The psychological umbilical cord is more difficult to cut than the real one. We experience our children as extensions of ourselves, and we feel as though their behavior is an expression of something within us...instead of an expression of something in them. We see in our children our own reflection, and when we dont like what we see, we feel angry at the reflection.”
—Elaine Heffner (20th century)