diff options
author | Adam <Adam@anope.org> | 2013-02-14 20:57:40 -0500 |
---|---|---|
committer | Adam <Adam@anope.org> | 2013-02-14 20:57:40 -0500 |
commit | 391f2822c8f6da7d6ffa8114817a8baf2aa265d5 (patch) | |
tree | b8c9c566481fe13083d12f0d750ba30ca3e87456 /src | |
parent | f0875c5d85e0a6c1d878aed01673c0d909a8d488 (diff) |
This Serialize::Destroy method isn't actually needed anymore. Fixes weirdness from a few Serializable items we had on the stack. Added a comment about why operator< in Reference fails.
Diffstat (limited to 'src')
-rw-r--r-- | src/serialize.cpp | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/serialize.cpp b/src/serialize.cpp index 4f0068a48..8828965b5 100644 --- a/src/serialize.cpp +++ b/src/serialize.cpp @@ -67,6 +67,8 @@ Serializable::Serializable(const Serializable &other) : last_commit(NULL), last_ Serializable::~Serializable() { + FOREACH_MOD(I_OnSerializableDestruct, OnSerializableDestruct(this)); + SerializableItems->erase(this->s_iter); delete last_commit; } @@ -76,16 +78,6 @@ Serializable &Serializable::operator=(const Serializable &) return *this; } -void Serializable::Destroy() -{ - if (!this) - return; - - FOREACH_MOD(I_OnSerializableDestruct, OnSerializableDestruct(this)); - - delete this; -} - void Serializable::QueueUpdate() { /* Schedule updater */ |