In my program written with C and C++, I will new an object to fulfill the task, then delete the object.
At the moment after new object but before delete object, if t
If you allocated any SYSV Shared Memory Segments using shmget(2)
then you must clean up after yourself with shmctl(2)
.
If you allocated any POSIX Shared Memory Segments using shm_open(3)
then you must clean up after yourself with shm_unlink(3)
.
Both SYSV and POSIX shared memory segments persist past process termination. You can see what persists using the ipcs(1)
tool.
Of course, if you haven't used any SYSV or POSIX shared memory segments, then this is all just noise. :)