I wrote some test utilities that register a debug utils messenger to provide extra info. I don't keep it around because I was relying on the "parent handle destruction implies child handle destruction" behavior, but it appears that's not the case, at least for this handle type.
As a demonstration, I have a static uintptr_t variable in the function that creates and registers the debug messenger, which gets incremented with each call and is passed as the userData parameter. My callback then prints the userdata param (cast back to an integer) at the beginning of the line. After a few test cycles, here's some sample output showing all 21 debug messengers are still active.
I wrote some test utilities that register a debug utils messenger to provide extra info. I don't keep it around because I was relying on the "parent handle destruction implies child handle destruction" behavior, but it appears that's not the case, at least for this handle type.
As a demonstration, I have a static
uintptr_t
variable in the function that creates and registers the debug messenger, which gets incremented with each call and is passed as theuserData
parameter. My callback then prints the userdata param (cast back to an integer) at the beginning of the line. After a few test cycles, here's some sample output showing all 21 debug messengers are still active.