diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2012-04-23 11:26:18 -0400 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2012-04-23 11:26:18 -0400 |
commit | eb1bea222322385e6e5b05206f09f21bb891f3f7 (patch) | |
tree | a9756c7953afd07f966343cdc02f7b6b64d47f87 /indra/llinventory/llparcelflags.h | |
parent | 38e23bb0eb71e160fdfa829398a46ec3db01d7aa (diff) |
IQA-463: LLError::addRecorder() claims ownership of passed Recorder*.
That is, when the underlying LLError::Settings object is destroyed -- possibly
at termination, possibly on LLError::restoreSettings() -- the passed Recorder*
is deleted.
There was much existing code that seemed as unaware of this alarming fact as I
was myself. Passing to addRecorder() a pointer to a stack object, or to a
member of some other object, is just Bad. It might be preferable to make
addRecorder() accept std::auto_ptr<Recorder> to make the ownership transfer
more explicit -- or even boost::shared_ptr<Recorder> instead, which would
allow the caller to either forget or retain the passed Recorder.
This preliminary pass retains the Recorder* dumb pointer API, but documents
the ownership issue, and eliminates known instances of passing pointers to
anything but a standalone heap Recorder subclass object.
Diffstat (limited to 'indra/llinventory/llparcelflags.h')
0 files changed, 0 insertions, 0 deletions