summaryrefslogtreecommitdiff
path: root/hscript/script.cc
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2019-10-12 07:14:52 -0500
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2019-10-12 07:14:52 -0500
commit6e80e6b3cffaf42723c61443244e04977a0fe8ed (patch)
treed4fa9b55cc8bb6af918f0ccd4c490b381e81684a /hscript/script.cc
parenta94066d62a33e25ddb1eafce78627f2a3361f4ca (diff)
downloadhorizon-6e80e6b3cffaf42723c61443244e04977a0fe8ed.tar.gz
horizon-6e80e6b3cffaf42723c61443244e04977a0fe8ed.tar.bz2
horizon-6e80e6b3cffaf42723c61443244e04977a0fe8ed.tar.xz
horizon-6e80e6b3cffaf42723c61443244e04977a0fe8ed.zip
hscript: Ensure resources are reclaimed when Script is destroyed
Diffstat (limited to 'hscript/script.cc')
-rw-r--r--hscript/script.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/hscript/script.cc b/hscript/script.cc
index 585a18c..e324356 100644
--- a/hscript/script.cc
+++ b/hscript/script.cc
@@ -169,6 +169,10 @@ Script::Script() {
internal = new ScriptPrivate;
}
+Script::~Script() {
+ delete internal;
+}
+
const Script *Script::load(const std::string path, const ScriptOptions opts) {
std::ifstream file(path);
if(!file) {