Skip to content

Conversation

@mscolnick
Copy link
Contributor

@mscolnick mscolnick commented May 1, 2025

Cleanup always expanding dictionary

@vercel
Copy link

vercel bot commented May 1, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
marimo-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 1, 2025 7:08pm


# Store the object if display_id is provided
if display_id is not None:
display_objects[display_id] = output_value
Copy link
Collaborator

Choose a reason for hiding this comment

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

Cleaning up the wekref doesn't automatically release the object

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thats fine. them staying in here is harmless.

@mscolnick mscolnick merged commit fdf8504 into main May 1, 2025
36 of 37 checks passed
@mscolnick mscolnick deleted the ms/cleanup branch May 1, 2025 19:30
@github-actions
Copy link

github-actions bot commented May 1, 2025

🚀 Development release published. You may be able to view the changes at https://marimo.app?v=0.13.4-dev21

if len(display_objects) > 1000: # Arbitrary limit
clear_display_objects()

_output.append(output_value)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Yeah, I think move this line before you set display_objects and you should be fine

@dmadisetti dmadisetti mentioned this pull request May 2, 2025
4 tasks
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.

3 participants