-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Wednesday 03 June 2009, Zachary Turner wrote:
You're right! But how can I adapt this code to use RAII? Maybe is more simple to add a try-catch statement?
See the example I gave above using thread_specific_ptr. thread_specific_ptr frees its objects when the thread exits and the example above works regardless of whether or not you are always only using COM from threads you've created manually.
Why are so many people's quoting in the plain-text version of their emails broken? Is this a gmail problem? -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEUEARECAAYFAkomiVIACgkQ5vihyNWuA4XzlQCXdxJSYcuN3s5kTOmE/h35wdMo 1wCgrQgcy1sSzPFuREDofFwzWxqGQPU= =2zD3 -----END PGP SIGNATURE-----