WIP: Fix dram memory leak issue
1)Currently dirty_list is a raw pointer. So resource handling done manually. 2) One of the issue surfaced due to previous fix: where, bool has_dirty_versions() const { return dirty_list != nullptr } was changed to bool has_dirty_versions() const { return dirty_list != nullptr && !dirty_list->empty(); }