Open ntfshard opened 7 years ago
Great thanks for pointing it out! Would you have time to prepare pull request?
Ok, I'll fix it; Unfortunately I'm not a nodejs user and it could be a little bit difficult to test it properly
Great!
Maybe you can use sample player in examples directory for testing?
This patch should fix memory leak. Unfortunately I found same issues in a bendi/node-mp3info project =\
Happy holidays
Hello
I guess in _master/src/nodempg123.cc in line: 51 your _mpg123handle *mh leaks; IMHO you should destroy it in dtor with _mpg123_delete(mpg123handle *);
BTW it looks like your _loopdata pointer from line: 60 doesn't have a corresponding delete IMHO dynamic allocation is not needed here =)
P.S. you can delete/free a nullptr -- it's ok (according to C++ standard): n3797:5.3.5_2 ... In the first alternative (delete object), the value of the operand of delete may be a null pointer value, a pointer to a non-array object created by a previous new-expression, or a pointer to a subobject...
So you can avoid using condition like in line 122
--M