Skip to content

Commit

Permalink
free the sendBuffer and sendHeader when destroying the voice connecti…
Browse files Browse the repository at this point in the history
…on object
  • Loading branch information
TTtie committed Nov 2, 2024
1 parent ae0a69c commit 3edd7f1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/voice/VoiceConnection.js
Original file line number Diff line number Diff line change
Expand Up @@ -912,6 +912,8 @@ class VoiceConnection extends EventEmitter {
}

_destroy() {
this.sendBuffer.free();
this.sendHeader.free();
if(this.opus) {
for(const key in this.opus) {
this.opus[key].delete?.();
Expand Down

0 comments on commit 3edd7f1

Please sign in to comment.