question as to when a new command gets executed

Jacob Carlborg doob at me.com
Wed Nov 11 06:21:38 UTC 2020


On 2020-11-11 06:29, WhatMeWorry wrote:

> Which begs the question, how would the statement, m_State = new 
> BreakState() ever get executed?
> 
> class DebuggerSession
> {
>      private BreakState m_State = new BreakState();
>      private UnrealCallback m_UnrealCallback;
> 
>      this( )
>      {
>      }
>      // rest of class
> }

It gets executed at compile time. All instances of `DebuggerSession` 
will share the same single instance of `BreakState`.

-- 
/Jacob Carlborg


More information about the Digitalmars-d-learn mailing list