Skip to content

Conversation

@arunjose696
Copy link
Contributor

This minor refactoring removes unnecessary calls to GC.dispose(), as disposing an Image automatically disposes its associated GC.

The images affected by this change are the color-rectangle visuals used in the color selector and syntax coloring. I tested the behavior both before and after the change and observed no visual differences.

This minor refactoring eliminates unnecessary calls to GC.dispose() since disposing an Image automatically disposes its associated GC. There is no visual impact from this change.
@github-actions
Copy link
Contributor

Test Results

 3 018 files  ±0   3 018 suites  ±0   2h 19m 11s ⏱️ - 10m 43s
 8 270 tests ±0   8 021 ✅  - 1  248 💤 ±0  1 ❌ +1 
23 634 runs  ±0  22 842 ✅  - 1  791 💤 ±0  1 ❌ +1 

For more details on these failures, see this check.

Results for commit f69f613. ± Comparison against base commit 62f3974.

gc.drawRectangle(offset, offset, usableImageSize - offset, usableImageSize - offset);
gc.fillRectangle(offset + 1, offset + 1, usableImageSize - offset - 1,
usableImageSize - offset - 1);
gc.dispose();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When will the image of this GC be disposed? It's not that obvious so it might be that this GC lives for a very long time. Couldn't the image creation be changed to an ImageGcDrawer instead?

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

Successfully merging this pull request may close these issues.

2 participants