On 09/03/2016 1:32, Davies, John wrote:
I’m refactoring some code that has a pretty good suite of unit tests. Or at least I think it does, since I wrote them<g>.
I have a process that dispatches messages to one or more other processes that have their own message queues. It’s just a switchboard.
The refactored code works, and runs much faster than the test code I had written before. Much faster. And passes the unit tests.
But in the process I see a bunch of stuff in the boost-interprocess folder with long hex names. They get cleaned up when the tests are done.
It seems the long hex names come when I’m destructing the queues. So is it part of garbage collection?
It only concerns me because other times I saw names like that it was because I was trying to make two input queues with the same name.
It's part of the "unlink" operation. In Windows, there is no "unlink" operation in the sense of a UNIX "unlink", where the file is removed from the filesystem even if it's in use. Boost.Interprocess uses mapped files for message queues in windows, and emulates Posix behaviour changing the name of the file (message queue) when calling remove and marking that file to be deleted when the last handle is closed. So yes, it's part of the "garbage collection" used in Windows to achieve Posix behaviour. Best, Ion