I hate class destructors with a burning passion

mw mingwu at gmail.com
Sun Jun 6 18:37:54 UTC 2021


On Sunday, 6 June 2021 at 18:24:45 UTC, rikki cattermole wrote:
>
> On 07/06/2021 5:48 AM, mw wrote:
>> We can even add a compiler flag: let the developer specify the 
>> buffer size, e.g. in debug build: 1024 * 100, and 1024 or 0 in 
>> release build.
>
> It could be allocated using the DRT argument handling allowing 
> it to be set at runtime rather than just at compilation.

I've thought about it, but think it's better be controlled by the 
compiler: e.g. in release mode, commercial developers may not 
want the software end-user to peek into the trade secret by 
specifying a bigger buffer size flag at runtime, so s/he can see 
the stack frames the developers not intended to publish.



More information about the Digitalmars-d mailing list