<div><div dir="auto">Hi Michael</div></div><div dir="auto"><br></div><div dir="auto">My sub_bin is built outside, but visible from inside the Fun’s scope.</div><div dir="auto"><br></div><div dir="auto">/Frank</div><div dir="auto"> </div><div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 2/6/19 2:53 AM, Frank Muller wrote:<br>
> Hello Michael and Fred<br>
><br>
> Combing both solutions gave the best result. No need to even touch the <br>
> memory allocators at all and the system look stable for the last days.<br>
><br>
> Michael: I’m passing a sub_binary to the child process created with <br>
> your sync_fun/2. Is it still a good idea to call binary:copy/1 on this <br>
> sub_bin inside the Fun? I think it’s useless because this process is <br>
> garbage collected ASAP anyway.<br>
<br>
It isn't necessary.  It should be better and simpler to only create a <br>
sub_binary inside the temporary process, but it may depend on your <br>
situation.  The reference counting will ensure all the binaries you need <br>
after the temporary process is done are kept and you don't need to do <br>
anything special for that to happen (only keep all the temporary <br>
binaries inside the temporary process).<br>
<br>
Best Regards,<br>
Michael<br>
</blockquote></div></div>