<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
</head>
<body>
<div name="messageBodySection">
<div dir="auto">If you don’t care about safety around the allocations of your particular data type, you can certainly have “unsafe” sections of your code that are responsible for the allocation/deallocation of your data type. In the unsafe code (which can be as little as an expression or as much as a function) you can do anything. The point is that the unsafety is limited to sections of code that can be identified as unsafe and can be identified by something as crude as grep.
<div dir="auto"><br /></div>
<div dir="auto">If you haven’t yet, I encourage you to read through the <a href="http://cliffle.com/p/dangerust/">http://cliffle.com/p/dangerust/</a> article. It’s very good, and will demonstrate that in Rust, you can be as crude as C or as safe as Haskell, or anywhere in between - with very fine granularity.</div>
</div>
</div>
<div name="messageSignatureSection"><br />
<div class="matchFont">../Dave</div>
</div>
<div name="messageReplySection">On Jan 2, 2020, 5:16 PM -0500, Nicholas Krause <xerofoify@gmail.com>, wrote:<br />
<blockquote type="cite" class="spark_quote" style="margin: 5px 5px; padding-left: 10px; border-left: thin solid #1abc9c;"><br />
<br />
<div class="moz-cite-prefix">On 1/2/20 1:57 PM, David Mason wrote:<br /></div>
<blockquote type="cite" cite="mid:9c640e36-82bf-486f-996d-7ae045c9c375@Spark" class="spark_quote" style="margin: 5px 5px; padding-left: 10px; border-left: thin solid #e67e22;">
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<div name="messageBodySection">
<div dir="auto">
<div dir="auto"><span style="caret-color: rgb(39, 39, 40);">On Jan 2, 2020, 11:22 AM -0500, Nicholas Krause <a class="moz-txt-link-rfc2396E" href="mailto:xerofoify@gmail.com"><xerofoify@gmail.com></a>, wrote:</span><br />
<blockquote type="cite" class="spark_quote" style="margin: 5px 5px; padding-left: 10px; border-left: thin solid #3498db;">Thanks for letting me know. Don't know if it will be solved as that's a problem in my view.<br /></blockquote>
</div>
<div dir="auto"><br /></div>
I was going to say that you could implement a garbage collector in/for Rust, but first I checked if there was a crate for one, and sure enough, there is: <a href="https://github.com/Manishearth/rust-gc/" moz-do-not-send="true">https://github.com/Manishearth/rust-gc/</a> for those occasions when you really need a garbage collector. It’s in development, but looks pretty usable.</div>
</div>
<div name="messageSignatureSection"><br />
<div class="matchFont">../Dave</div>
</div>
</blockquote>
This isn't a issue that can be solved by a garbage collector which are notoriously for having<br />
these leaks but something like a unsafe mode with something similar to weak_ptr in C++.<br />
<br />
<br />
Not sure what the unsafe Rust implementation would would do but its a outstanding<br />
issue if you assume that memory has a non circular owner,<br />
<br />
Nick<br /></blockquote>
</div>
</body>
</html>