From f9985b080babc1e8faf328e85e044cca0f39b32d Mon Sep 17 00:00:00 2001 From: narender08 <56318863+narender08@users.noreply.github.com> Date: Wed, 9 Oct 2019 00:25:35 +0530 Subject: [PATCH] documentation of destructor --- Dictionary/dictionary.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Dictionary/dictionary.cpp b/Dictionary/dictionary.cpp index a7b3e1d..953b26c 100644 --- a/Dictionary/dictionary.cpp +++ b/Dictionary/dictionary.cpp @@ -144,6 +144,13 @@ TrieNode* Dictionary::clearDictionary(TrieNode *temp) } Dictionary ::~Dictionary() { + /* + objective: to deallocate all heap memory before deallocation of object + input parameters: none + output value: none + approach: calling function clearDictionary + */ + clearDictionary(root); }