Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
runtime: mark long lived objects with a special flag #17047
I've been thinking on how to make finding memory leaks a bit easier for Go users.
I would like to ask if it's possible to introduce a runtime flag like
I know this would imply a runtime penalty but when trying to find a memory leak performance is not the priority.
What do you think? Would this be possible? If you need further details to clarify this please let me know.
@randall77 thanks for your reply.
That is true, probably it's going to be a bit too much / too noisy. On the other hand, I can't think of another way to make things easier to spot when leaks happen. I'd be happy with having a list of objects that I can then instruct whatever tool will handle this output to ignore as I can mark them as such.
But if there are better ways to achieve this then that would be good as well.