Skip to content
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

ShellItem not released on error in Windows implementation #41

Closed
demurgos opened this issue Dec 3, 2017 · 5 comments
Closed

ShellItem not released on error in Windows implementation #41

demurgos opened this issue Dec 3, 2017 · 5 comments

Comments

@demurgos
Copy link

demurgos commented Dec 3, 2017

Hi,
The following ShellItem is not released if an error is returned while using it (the function jumps to the end):

::IShellItem *shellItem(NULL);

Similarly, the file dialog itself is never released.

Compare it to the official example.

@mlabbe
Copy link
Owner

mlabbe commented Dec 22, 2017

I agree, this needs doing! If you offer a PR, I would be happy to merge it.

https://github.com/mlabbe/nativefiledialog/blob/master/docs/submitting_pull_requests.md

@mlabbe
Copy link
Owner

mlabbe commented Jan 13, 2018

Friendly bump. If you have any time, I'd appreciate it.

@demurgos
Copy link
Author

Thanks for the reminder.
I have a busy period at the moment and I'm not sure I'll be able to do it in January. I'll send a PR once I have more time.

@MrSapps
Copy link
Contributor

MrSapps commented Feb 23, 2018

Could maybe switch to use the RAII objects - the ComPtr would auto call release in any circumstance

@mlabbe
Copy link
Owner

mlabbe commented Dec 31, 2018

I implemented a fix for all of the cases on the devel branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants