Skip to content

Include display objects in gc #1928

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

Merged
merged 1 commit into from
Jun 6, 2019
Merged

Conversation

dhalbert
Copy link
Collaborator

@dhalbert dhalbert commented Jun 6, 2019

The Group object in Display was not being marked during gc. Because the display objects are not on the heap, they can't be added to the root pointer list. So gc them explicitly.

Also:

  • Added a gc_collect_ptr() routine to gc a single pointer, for convenience.
  • Fixed some #ifdefs that should have been #ifs.
  • Added some missing #ifs in nrf port.
  • Removed redundant #if guard in reset_displays().
  • Removed a SAMD21 platform setting from some doc.

In the long run we could use a more general mechanism, or at least perhaps factor this code into supervisor to hide the details from main.c. (As discussed with @tannewt.)

@dhalbert dhalbert requested a review from tannewt June 6, 2019 21:56
Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

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

Thank you!

@dhalbert
Copy link
Collaborator Author

dhalbert commented Jun 6, 2019

@ATMakersBill did test this and he no longers sees the crashes.

@tannewt tannewt merged commit fecd3f8 into adafruit:4.0.x Jun 6, 2019
@dhalbert dhalbert deleted the gc-display-objects branch June 6, 2019 22:47
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