Well, If i add some println Statments they will be executed. It is simply that the window with the image stays open and therefore the program won’t finish.
If I look in the HighGui class it seems to me that destroyAllWindows() doesnt’t close the window but only deletes it from the map where it was stored. But on the other hand I am certainly not the first one to use this library so if this was the reason it should have been fixed already.
that would be news to me and contradicts all official examples I’ve ever seen. those windows.remove() calls are sure to do more than just “remove” it from a list.