These are chat archives for IndySockets/Indy

11th
Jan 2019
Remy Lebeau
@rlebeau
Jan 11 13:13
@mezen yes, that is the correct usage
@mezen access to GStack and related globals is guaranteed to be valid only when the usage counter is > 0
Remy Lebeau
@rlebeau
Jan 11 13:20
@mezen IncUsage instantiates the platform-specific class assigned to GStackClass (TIdStackWindows, TIdStackVCLPosix, etc) and their constructors then set GStack, GBSDStack, GWindowsStack as needed. No, none of them are set to nil when destroyed (such as by DecUsage)
mezen
@mezen
Jan 11 13:42
None of them are set to nil? What about
      if GInstanceCount = 0 then begin
        FreeAndNil(GStack);
      end;
Remy Lebeau
@rlebeau
Jan 11 15:49
@mezen nevermind