If you have a container of objects, you still need to free each object. If it is an "container" of value objects (one reference to a block of memory), you can free once at the block level, but if the block needs to be expanded (dynamic memory), you need to copy all of the data (or use a complex sparse array structure, and then you pay the performance hit during iteration). There is no free lunch.

-----Original Message-----
From: ⚛ <0xe2.0x9a.0...@gmail.com>
Sent: Feb 14, 2020 8:52 AM
To: golang-nuts
Subject: Re: [go-nuts] Go without garbage collector

On Friday, February 14, 2020 at 3:43:40 PM UTC+1, Robert Engels wrote:
If each object exists independently - which it does in this case - you must use a free on each object. So you are going to loop - it just may be hidden from you.

I am sorry, I do not understand your style of reasoning in general. 

--
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/9f980aed-6fd7-4ac5-ab79-c8415302a31c%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/1662044109.1005.1581699420223%40wamui-sophie.atl.sa.earthlink.net.

Reply via email to