File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -36,7 +36,12 @@ class globals_impl final
3636 // Initializes a new global store from the given story
3737 globals_impl (const story_impl*);
3838
39- virtual ~globals_impl () {}
39+ virtual ~globals_impl ()
40+ {
41+ for (const auto & callback : _callbacks) {
42+ delete callback.operation ;
43+ }
44+ }
4045
4146 snapshot* create_snapshot () const override ;
4247
Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ class callback_base
2626{
2727public:
2828 virtual void call (ink::runtime::value, ink::optional<ink::runtime::value>) = 0;
29+ virtual ~callback_base () = default ;
2930};
3031
3132template <typename F>
@@ -313,8 +314,8 @@ class function_array_delegate : public function_base
313314 char * ptr = buffer;
314315 while (*src != ' \0 ' )
315316 *(ptr++) = *(src++);
316- *ptr = 0 ;
317- result = ink::runtime::value (buffer);
317+ *ptr = 0 ;
318+ result = ink::runtime::value (buffer);
318319 }
319320 push (stack, result);
320321 }
You can’t perform that action at this time.
0 commit comments