diff options
author | William Todd Stinson <stinson@lindenlab.com> | 2012-11-02 13:22:48 -0700 |
---|---|---|
committer | William Todd Stinson <stinson@lindenlab.com> | 2012-11-02 13:22:48 -0700 |
commit | 6e2b3527cc95b92bf136b65fd2ee344d4c879faa (patch) | |
tree | 5e4aa1dcce13240416b72ab869a9d8463e1dafc6 /indra/newview/llavatariconctrl.h | |
parent | b9116764a97dfdccf803315c8c3b0d29fa3ce654 (diff) |
CHUI-475: Ensuring that objects that query the avatar name cache with a callback store the connection and disconnect on object destruction. This should help resolve some of the heap corruption we are seeing.
Diffstat (limited to 'indra/newview/llavatariconctrl.h')
-rw-r--r-- | indra/newview/llavatariconctrl.h | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/indra/newview/llavatariconctrl.h b/indra/newview/llavatariconctrl.h index 7f568fc5b8..f55967926a 100644 --- a/indra/newview/llavatariconctrl.h +++ b/indra/newview/llavatariconctrl.h @@ -27,6 +27,8 @@ #ifndef LL_LLAVATARICONCTRL_H #define LL_LLAVATARICONCTRL_H +#include <boost/signals2.hpp> + #include "lliconctrl.h" #include "llavatarpropertiesprocessor.h" #include "llviewermenu.h" @@ -86,20 +88,24 @@ public: // LLAvatarPropertiesProcessor observer trigger virtual void processProperties(void* data, EAvatarProcessorType type); - void onAvatarNameCache(const LLUUID& agent_id, const LLAvatarName& av_name); - const LLUUID& getAvatarId() const { return mAvatarId; } const std::string& getFullName() const { return mFullName; } void setDrawTooltip(bool value) { mDrawTooltip = value;} protected: - LLUUID mAvatarId; - std::string mFullName; - bool mDrawTooltip; - std::string mDefaultIconName; + LLUUID mAvatarId; + std::string mFullName; + bool mDrawTooltip; + std::string mDefaultIconName; bool updateFromCache(); + +private: + void fetchAvatarName(); + void onAvatarNameCache(const LLUUID& agent_id, const LLAvatarName& av_name); + + boost::signals2::connection mAvatarNameCacheConnection; }; #endif // LL_LLAVATARICONCTRL_H |