Skip to content

Commit

Permalink
test: fix operator delete overload
Browse files Browse the repository at this point in the history
  • Loading branch information
toyobayashi committed Jan 22, 2025
1 parent a3dfc46 commit 610c3d9
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/emnapi/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -561,6 +561,10 @@ void* operator new(size_t size) {
void operator delete(void* p) noexcept {
free(p);
}

void operator delete(void* p, size_t) noexcept {
free(p);
}
```
</details>
Expand Down
4 changes: 4 additions & 0 deletions packages/test/fnwrap/myobject.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ void* operator new(size_t size) {
void operator delete(void* p) noexcept {
free(p);
}

void operator delete(void* p, size_t) noexcept {
free(p);
}
#endif

static int finalize_count = 0;
Expand Down
4 changes: 4 additions & 0 deletions packages/test/objwrap/myobject.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ void* operator new(size_t size) {
void operator delete(void* p) noexcept {
free(p);
}

void operator delete(void* p, size_t) noexcept {
free(p);
}
#endif

typedef int32_t FinalizerData;
Expand Down
4 changes: 4 additions & 0 deletions packages/test/passwrap/myobject.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ void* operator new(size_t size) {
void operator delete(void* p) noexcept {
free(p);
}

void operator delete(void* p, size_t) noexcept {
free(p);
}
#endif

size_t finalize_count = 0;
Expand Down

0 comments on commit 610c3d9

Please sign in to comment.