Perhaps he meant doing something like: this refence dies here, control of the object is now passed to the "Strategy Manager", that could be a reference counter that decreases its counter, the GC that takes care of everything, and so on.On 2/6/14, 9:54 AM, Frustrated wrote:{ auto a = new!strategy A;// implicit deallocation: compiler inserts strategy.scopeDeallocation(a); }I don't think this works. The scope of "strategy" and "a" may be unrelated. More importantly a may be escaped (e.g. by passing it to functions etc) unbeknownst to "strategy", which in fact suggests that the strategy must be somehow known by "a" independently.
On Thursday, 6 February 2014 at 18:18:49 UTC, Andrei Alexandrescu
wrote:
- Disadvantages of building a compiler and library on to... Frustrated
- Re: Disadvantages of building a compiler and libr... Andrei Alexandrescu
- Re: Disadvantages of building a compiler and ... fra
- Re: Disadvantages of building a compiler ... Frustrated
- Re: Disadvantages of building a compiler and ... Frustrated
- Re: Disadvantages of building a compiler ... Andrei Alexandrescu
- Re: Disadvantages of building a compi... Frustrated
- Re: Disadvantages of building a ... Andrei Alexandrescu
- Re: Disadvantages of buildin... Frustrated
- Re: Disadvantages of bui... Németh Péter
- Re: Disadvantages of bui... Frustrated
- Re: Disadvantages of bui... Marco Leise
- Re: Disadvantages of bui... logicchains
