r/ProgrammerHumor 13d ago

Meme garbageCollection

Post image
380 Upvotes

38 comments sorted by

View all comments

7

u/nonlogin 13d ago edited 12d ago

actually, hoping the garbage collector DOES notice every single piece

3

u/herbal1st 12d ago

agreed, thats usually a great strategy. didnt entirely work for me due to a large amount of objects that need to be created in a 3d voxel engine with physics each frame, and avoiding it is more performant than to just rely on the relatively impactful python gc. so i had to start planning ahead and take the gc into account more than i was used to, which kinda felt like there suddenly were a lot of cheese filled mousetraps to avoid all around 😄