I created an instance using NewSpeechSynthesizerFromConfig and placed it into a pool. If there are no requests within 10 minutes, the instance is released by calling s.speechSynthesizer.Close(), s.audioConfig.Close(), and s.speechConfig.Close(). However, I noticed that memory usage continues to increase steadily.
Upon debugging and inspecting memory, the Go memory usage remains stable, but there seems to be residual memory, likely from CGO, that keeps growing.
Memory stats:
"process_rss_mb": 106, "go_sys_mb": 25, "go_alloc_mb": 5
Is this a memory leak in the C library?
version v1.43.0
I created an instance using
NewSpeechSynthesizerFromConfigand placed it into a pool. If there are no requests within 10 minutes, the instance is released by callings.speechSynthesizer.Close(),s.audioConfig.Close(), ands.speechConfig.Close(). However, I noticed that memory usage continues to increase steadily.Upon debugging and inspecting memory, the Go memory usage remains stable, but there seems to be residual memory, likely from CGO, that keeps growing.
Memory stats:
"process_rss_mb": 106, "go_sys_mb": 25, "go_alloc_mb": 5Is this a memory leak in the C library?
version v1.43.0