-
-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
asynchronous drawImage speeds up execution but causes serious memory leaks. #890
Comments
After several tests on my side and after proceeding by elimination, I confirm I have the same issue. |
I have the same issue |
Lines 417 to 424 in 8ca3a9e
// 'static pointer
let self_mut = unsafe { Box::leak(Box::from_raw(image_ptr.cast::<Image>())) }; |
@Brooooooklyn since I have limited understanding of #[napi(setter)]
pub fn set_src(&mut self, env: Env, this: This, data: Uint8Array) -> Result<()> {
let length = data.len();
if length <= 2 {
self.src = Some(data);
+ self.bitmap = None;
+ self.width = -1.0;
+ self.height = -1.0; Of course, I have my own motives, as it just happens to meet another need of mine. #868 |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
@Brooooooklyn Hi, are there any progress on this issue, it's a serious problem on server, after a few requests, the server memory usage is full. |
The memory does not automatically drop to normal levels, even though I have enabled GC and cleared all cache.
The text was updated successfully, but these errors were encountered: