1

The question comes from: RAII and system resource cleanup

Actually cleanup system resource is hard. In my mind, a process can't "know" whether a system resource(file, message queue, semaphore, shared memory) is used by other process or not. If it's true, how to guarantee to cleanup system resource safely?

If that is no a reliable way to do that, how can we do? Are there some common ways for it?

Community
  • 1
  • 1
zhenjing
  • 145
  • 1
  • 7

0 Answers0