Leak-detection of references to scoped class instances

Per Nordlöw per.nordlow at gmail.com
Sun Nov 24 14:19:23 UTC 2019


On Sunday, 24 November 2019 at 12:51:53 UTC, rikki cattermole 
wrote:
> "Allocates a class object right inside the current scope, 
> therefore avoiding the overhead of new. This facility is 
> unsafe; it is the responsibility of the user to not escape a 
> reference to the object outside the scope."
>
> https://dlang.org/phobos/std_typecons.html#.scoped

Why doesn't DIP-1000 include such escape analysis?


More information about the Digitalmars-d-learn mailing list