diff --git a/src/bytecode.cpp b/src/bytecode.cpp index 3c18ac1..2e2ae7a 100644 --- a/src/bytecode.cpp +++ b/src/bytecode.cpp @@ -88,6 +88,15 @@ Bytecode::Bytecode(const Source& source) : jit_exception_set_handler(original_handler); } +/** + * Destructor + */ +Bytecode::~Bytecode() +{ + // if there is a signature, we need to free it + if (_function_signature) jit_type_free(_function_signature); +} + /** * Method to initialize an error label * @param label diff --git a/src/bytecode.h b/src/bytecode.h index fd00447..487f85a 100644 --- a/src/bytecode.h +++ b/src/bytecode.h @@ -284,7 +284,7 @@ class Bytecode : private Generator, public Executor /** * Destructor */ - virtual ~Bytecode() {}; + virtual ~Bytecode(); /** * Execute the template given a certain handler