We have a C library (.lib windows and .a linux), which allows you to create a singleton mode, which also does not close properly (memory leak and streams that survived) were once created.
By rewriting it and brushing off errors, is there an easy way to isolate this incorrect code in the process, so that the Singleton constraint can be removed, and the dirty tidyup can be sandboxed?
Basically, I'm interested in any options in the process, if they really are. A separate process will obviously solve it, but it will require architectural overhead to allow remote control of the library if there are no very weak solutions for this (it has a wide API, so saving a large amount of glue is not particularly attractive).
c ++ c ipc
idij
source share