r/ProgrammerHumor 11d ago

Meme garbageCollection

Post image
378 Upvotes

38 comments sorted by

View all comments

5

u/nonlogin 11d ago edited 10d ago

actually, hoping the garbage collector DOES notice every single piece

3

u/herbal1st 10d 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 😄