Commit e3f8e3ff authored by Simon Heybrock's avatar Simon Heybrock
Browse files

Re #0. Remove useless log cache that bypasses COW mechanism.

parent b0a908bb
......@@ -283,11 +283,6 @@ private:
/// Coordinates
Kernel::SpecialCoordinateSystem m_coordSystem;
// adapter for logs() function, which create reference to this class itself
// and does not allow to delete the shared pointers,
// returned by logs() function when they go out of scope
API::LogManager_sptr m_logCash;
};
/// Typedef for a shared pointer to a peaks workspace.
......
......@@ -877,15 +877,9 @@ PeaksWorkspace::getSpecialCoordinateSystem() const {
struct NullDeleter {
template <typename T> void operator()(T *) {}
};
/**Get access to shared pointer containing workspace porperties, cashes the
shared pointer
into internal class variable to not allow shared pointer being deleted */
/**Get access to shared pointer containing workspace porperties */
API::LogManager_sptr PeaksWorkspace::logs() {
if (m_logCash)
return m_logCash;
m_logCash = API::LogManager_sptr(&(this->mutableRun()), NullDeleter());
return m_logCash;
return API::LogManager_sptr(&(this->mutableRun()), NullDeleter());
}
/** Get constant access to shared pointer containing workspace porperties;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment