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

Disposing Pens and Brushes #6

Open
ddTech opened this issue Nov 25, 2017 · 0 comments
Open

Disposing Pens and Brushes #6

ddTech opened this issue Nov 25, 2017 · 0 comments

Comments

@ddTech
Copy link
Collaborator

ddTech commented Nov 25, 2017

I don't know if is necessary when handling gdi+ through the gdPlusX-wrapper but I remember when I dealt with gdi+ functions directly it was crucial to dispose pens and brushes in order to avoid memory leaks.
As these methods are exposed in gdiPlusX I think we should use them and if just for good manners.
I'm doing this not only in the .Destroy() but also in _.prepareBrushes() where pens or brushes are being overwritten by new ones.

In this context I changed initialization of the _o - properties from (none) or .F. to .NULL.. This way isNull()-tests do not necessarily require an additional type() test. ... and it's just "more correct".

Regards

Frank

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

No branches or pull requests

1 participant