<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On 23 jan 2015, at 13:27, Roberto Ostinelli <<a href="mailto:roberto@widetag.com" class="">roberto@widetag.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Correct, however just after this call the process gets hibernated so Data (I assume) is getting gc'ed right away).<div class=""><div class="gmail_extra"><br class=""></div></div></div></div></blockquote><div><br class=""></div><div>hibernate will garbage collect before going to sleep.</div><div><br class=""></div><div><br class=""></div><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class=""><div class="gmail_extra"><div class="gmail_quote">On Fri, Jan 23, 2015 at 7:14 AM, Dan Gudmundsson <span dir="ltr" class=""><<a href="mailto:dangud@gmail.com" target="_blank" class="">dangud@gmail.com</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class=""><div class="gmail_extra"><div class="gmail_quote"><br class=""><div class="">Binary copy makes a new copy of the binary regardless of size, but it is only useful on ref-c binaries,</div><div class="">and should be used to avoid keeping references to large binaries, when you keep and use a small part </div><div class="">of the original binary. But in this case you make a copy of Data (-2 bytes) and thus will double up the memory until Data is gc'ed and refc reaches zero. So I do not see the point of the above nor of making it a list which will</div><div class="">only explode your memory even more.</div><div class=""><br class=""></div></div></div></div></blockquote></div></div></div></div>
_______________________________________________<br class="">erlang-questions mailing list<br class=""><a href="mailto:erlang-questions@erlang.org" class="">erlang-questions@erlang.org</a><br class="">http://erlang.org/mailman/listinfo/erlang-questions<br class=""></div></blockquote></div><br class=""></body></html>