diff options
author | Ben Longbons <b.r.longbons@gmail.com> | 2013-06-11 21:55:13 -0700 |
---|---|---|
committer | Ben Longbons <b.r.longbons@gmail.com> | 2013-06-11 23:27:33 -0700 |
commit | 8b5370313dcc00a45ea5c3e8b4c497bc00fd8e13 (patch) | |
tree | 15e8a4841af992e17794f26fc7991ed40c35bd51 /src/map/itemdb.cpp | |
parent | 8c6072df499ef9068346fbe8313b63dbba1e4e82 (diff) | |
download | tmwa-8b5370313dcc00a45ea5c3e8b4c497bc00fd8e13.tar.gz tmwa-8b5370313dcc00a45ea5c3e8b4c497bc00fd8e13.tar.bz2 tmwa-8b5370313dcc00a45ea5c3e8b4c497bc00fd8e13.tar.xz tmwa-8b5370313dcc00a45ea5c3e8b4c497bc00fd8e13.zip |
Allegedly remove all manual memory management
Diffstat (limited to 'src/map/itemdb.cpp')
-rw-r--r-- | src/map/itemdb.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/map/itemdb.cpp b/src/map/itemdb.cpp index f60dc53..147db91 100644 --- a/src/map/itemdb.cpp +++ b/src/map/itemdb.cpp @@ -367,10 +367,8 @@ int itemdb_read_noequip(void) static void itemdb_final(struct item_data *id) { - if (id->use_script) - free(const_cast<ScriptCode *>(id->use_script)); - if (id->equip_script) - free(const_cast<ScriptCode *>(id->equip_script)); + id->use_script.reset(); + id->equip_script.reset(); } void itemdb_reload(void) |