Or does it have memory cost?
I need to generate 50 new instance per seconds, each instance passes through a pipeline and after some modification I leave that instance (each instance lives maximum 1min)
Can anyone help me?
Are your instances safe for concurrent access? If yes, then sth is wrong with your design. Otherwise take a look at sync.Pool
of course if does, where would it exist otherwise?!
if you never make it a pointer, golang will have an easier time cleaning up the structs, for what it's worth
Обсуждают сегодня