
I finally managed to get rid of the "intentional memory leak" that was present in the tss code. I used a reference counting technique, where the global data structures (containing boost::function objects and boost::mutex) are freed after last handler or destructor (whichever comes last) has been run. Since the order when they are run is not guaranteed, the ref counting approach should compensate for this. I have checked this in to HEAD awaiting regression results. I would be very glad if someone could do a review before commiting this to RC_1_34_0 too. I have to admit that the code does not look very beautiful, but my intent was to get it correct, without changing the logic too much to avoid introducing new bugs. N.b.: The memory leak was a major annoyance on Windows, since it makes debugging a lot harder there. Regards, Roland