From: Braden M. <br...@us...> - 2007-02-10 04:13:42
|
Update of /cvsroot/openvrml/openvrml/src/openvrml-player In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv31970/src/openvrml-player Modified Files: Tag: OpenVRML-0_16-BRANCH player.cpp Log Message: Use ScopeGuard to manage libcurl clean up. Index: player.cpp =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/openvrml-player/player.cpp,v retrieving revision 1.1.2.10 retrieving revision 1.1.2.11 diff -C2 -d -r1.1.2.10 -r1.1.2.11 *** player.cpp 9 Feb 2007 22:37:44 -0000 1.1.2.10 --- player.cpp 10 Feb 2007 04:13:39 -0000 1.1.2.11 *************** *** 142,145 **** --- 142,147 ---- return EXIT_FAILURE; } + scope_guard curl_global_guard = make_guard(curl_global_cleanup); + boost::ignore_unused_variable_warning(curl_global_guard); gchar ** remaining_args = 0; *************** *** 298,301 **** --- 300,306 ---- CURLM * const multi_handle = curl_multi_init(); g_return_val_if_fail(multi_handle, EXIT_FAILURE); + scope_guard multi_handle_guard = make_guard(curl_multi_cleanup, + multi_handle); + boost::ignore_unused_variable_warning(multi_handle_guard); GSource * const curl_source = curl_source_new(multi_handle); |