Closed riyulu closed 11 months ago
Hi, @riyulu. Thanks for filing this issues. For the delete pointer question, because we need to release the memory when the plugin is getting destruct.
I come across the same problem , which will cause window close very slowly
comments the above two, there are still many other crash.
Hi @wanjm. Can you provide more info about the crash that you have faced?
Is that means the window close slowly after you press the close button?
because we need to release the memory when the plugin is getting destruct.
@aaassseee hello, gays. My idea is that this memory is created externally and does not need to be released internally by the plugin. We should only delete the memory we create ourselves.
And I have found there is a problem here, but I am not sure how to fix it.
Hi @riyulu. I found this artical, I am implementing this solution. Hopes it works.
Hi @riyulu. Is that only deleting windowhandler causing crashes? Not the registrar_?
Hi @riyulu @wanjm. I have updated screen_brightness_windows to 0.1.2. Please do a pub update to get the latest version to fix the issue.
Maybe #15 is also same with this issue.
Hi @riyulu @wanjm. I have updated screen_brightness_windows to 0.1.2. Please do a pub update to get the latest version to fix the issue.
@aaassseee There are still some issues here. If I have time this weekend, I will raise a PR
@riyulu thanks for the contribution.
I removed all delete
statements altogether, no crash happens.
Is it necessary to have those? AFAIK destructor is only being called upon process termination.
Please proceed with your own intellect, not very sure about this.
I removed all
delete
statements altogether, no crash happens.Is it necessary to have those? AFAIK destructor is only being called upon process termination.
Please proceed with your own intellect, not very sure about this.
Seems other Windows package does not delete pointer when destructor being called.
Maybe this is the solution.
Latest Windows package has been release. Please do a pub upgrade and check if there are any problems.
Hi!
I appreciate your fixes. It does seem to work in my case.
Thanks!
Are there any crash after this fix?
No. It's all good from what I can tell.
Description (bug summary)
crash in windows
Why do you want to delete these two pointers?
Step to reproduce (how to reproduce the bug)
cd screen_brightness/screen_brightness/example && flutter run -d windows
and quitPlatform (Android/iOS/macOS/Windows)
windows