Browse Source

src: mark AsyncWrap destructor as virtual

Make AsyncWrap::~AsyncWrap() virtual, otherwise it is unsafe to delete
a derived class through a pointer to AsyncWrap.  Fortunately, we don't
do that anywhere right now; this commit is merely a preemptive bug fix.
archived-io.js-v0.12
Ben Noordhuis 10 years ago
parent
commit
f874855d2e
  1. 2
      src/async-wrap.h

2
src/async-wrap.h

@ -61,7 +61,7 @@ class AsyncWrap : public BaseObject {
v8::Handle<v8::Object> object,
ProviderType provider);
inline ~AsyncWrap() = default;
inline virtual ~AsyncWrap() = default;
inline bool has_async_listener();

Loading…
Cancel
Save