diff options
author | Callum Prentice <callum@lindenlab.com> | 2014-06-16 13:22:19 -0700 |
---|---|---|
committer | Callum Prentice <callum@lindenlab.com> | 2014-06-16 13:22:19 -0700 |
commit | f11dd1d8a3dc4ba9a3c23563126e11ee971e219f (patch) | |
tree | cc2798f96eafb50f42d097da7ac53e152777c402 /indra/llcommon/llerrorcontrol.h | |
parent | 483bd134162ffeef8760173aa223daee81c0f9e3 (diff) | |
parent | 977476171ddcc057d7c28b6c14ae988b8189ed75 (diff) |
Merge with head of viewer-release
Diffstat (limited to 'indra/llcommon/llerrorcontrol.h')
-rwxr-xr-x | indra/llcommon/llerrorcontrol.h | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/indra/llcommon/llerrorcontrol.h b/indra/llcommon/llerrorcontrol.h index aab695094c..56ac52e5de 100755 --- a/indra/llcommon/llerrorcontrol.h +++ b/indra/llcommon/llerrorcontrol.h @@ -29,7 +29,10 @@ #define LL_LLERRORCONTROL_H #include "llerror.h" +#include "llpointer.h" +#include "llrefcount.h" #include "boost/function.hpp" +#include "boost/shared_ptr.hpp" #include <string> class LLSD; @@ -156,16 +159,14 @@ namespace LLError mWantsFunctionName; }; + typedef boost::shared_ptr<Recorder> RecorderPtr; + /** - * @NOTE: addRecorder() conveys ownership to the underlying Settings - * object -- when destroyed, it will @em delete the passed Recorder*! - */ - LL_COMMON_API void addRecorder(Recorder*); - /** - * @NOTE: removeRecorder() reclaims ownership of the Recorder*: its - * lifespan becomes the caller's problem. + * @NOTE: addRecorder() and removeRecorder() uses the boost::shared_ptr to allow for shared ownership + * while still ensuring that the allocated memory is eventually freed */ - LL_COMMON_API void removeRecorder(Recorder*); + LL_COMMON_API void addRecorder(RecorderPtr); + LL_COMMON_API void removeRecorder(RecorderPtr); // each error message is passed to each recorder via recordMessage() LL_COMMON_API void logToFile(const std::string& filename); @@ -182,9 +183,9 @@ namespace LLError Utilities for use by the unit tests of LLError itself. */ - class Settings; - LL_COMMON_API Settings* saveAndResetSettings(); - LL_COMMON_API void restoreSettings(Settings *); + typedef LLPointer<LLRefCount> SettingsStoragePtr; + LL_COMMON_API SettingsStoragePtr saveAndResetSettings(); + LL_COMMON_API void restoreSettings(SettingsStoragePtr pSettingsStorage); LL_COMMON_API std::string abbreviateFile(const std::string& filePath); LL_COMMON_API int shouldLogCallCount(); |