Swift does away with pointers == pervasive ARC

Nick Sabalausky via Digitalmars-d digitalmars-d at puremagic.com
Tue Jun 17 13:36:49 PDT 2014


On 6/17/2014 3:04 PM, H. S. Teoh via Digitalmars-d wrote:
>
> I don't think the user would enjoy the app "randomly" shutting down and
> starting up again on him. :-)
>
> One idea that occurs to me, though, is to split the app into a frontend
> that does not allocate during runtime, and a backend, which may. Design
> it in such a way that the backend can freely restart anytime without
> adversely affecting the frontend; then you can maintain an apparance of
> continuous execution across backend restarts.
>
> If the restart time can be reduced to within a single animation frame,
> for example, one could actually write a game engine that never
> deallocates, it just restarts itself when it runs out of memory and the
> frontend maintains the façade of continuous execution. This will trump
> GC, ARC, malloc, indeed, any memory allocation scheme beyond
> bump-a-pointer. :-P
>

Sounds cool, but I would think in that case you may as well just stick 
with region allocators. Same effect with less overhead and more 
fine-tuning control. Or a global region allocator or something.

Speaking of manual memory management, is it currently possible to 
manually allocate closures?



More information about the Digitalmars-d mailing list