That is a very large dpi and size. The cache that is created is going to be very large. I am guessing that it allocates so much memory so fast that the process is killed by the OS Out of memory killer before the GC runs to free the “dead” faces. Thus the OOM death..
> On May 13, 2020, at 4:03 PM, Manlio Perillo <manlio.peri...@gmail.com> wrote: > > > The following program using the freetype package leaks memory: > https://play.golang.org/p/I90PYZUngVu > > The first two cycles have no problems but starting with the third cycle there > is in an abnormal increase of CPU and memory usage. > At the fourth cycle on my system the program is terminated by the OOM killer. > > I looked at the NewFace implementation > (https://github.com/golang/freetype/blob/master/truetype/face.go#L179) but I > don't understand why memory is leaked. > > The original program is > https://git.sr.ht/~mendelmaleh/dummy/tree/master/cmd/dummy > > > Thanks > Manlio > -- > You received this message because you are subscribed to the Google Groups > "golang-nuts" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to golang-nuts+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/golang-nuts/680c0031-65a0-4695-a1eb-5bcd18b39b2e%40googlegroups.com. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/11AB28C7-5218-47FC-85BF-724C1077520A%40ix.netcom.com.