Jump to content

Search the Community

Showing results for tags 'destructor'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Delphi Questions and Answers
    • Algorithms, Data Structures and Class Design
    • VCL
    • FMX
    • RTL and Delphi Object Pascal
    • Databases
    • Network, Cloud and Web
    • Windows API
    • Cross-platform
    • Delphi IDE and APIs
    • General Help
    • Delphi Third-Party
  • C++Builder Questions and Answers
    • General Help
  • General Discussions
    • Embarcadero Lounge
    • Tips / Blogs / Tutorials / Videos
    • Job Opportunities / Coder for Hire
    • I made this
  • Software Development
    • Project Planning and -Management
    • Software Testing and Quality Assurance
  • Community
    • Community Management

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Delphi-Version

Found 1 result

  1. Can someone help me? I use a TObjectDictionary<integer,TmesData> with doOwnsValues, but if I remove an object via .Remove(key) my destructor does not get called. My class declaration: TmesData = class private procedure socketDataAvailable(Sender: TObject; ErrCode: Word); public payload: string; sendCount: integer; sendSocket: TWSocket; log: ts; sendTime: tdatetime; constructor create(alog: ts; const ip,port,apayload: string); destructor Destroy; //close and free socket function doConnect():boolean; function doSend():integer; end; On my form I do //create sendList sendList:=TObjectDictionary<integer,TmesData>.Create([doOwnsValues]); // add objects sendlist.Add(strtoint(seq),TmesData.create(doLog,edIP.Text,edPort.Text,mes)) later I do processing with for var seq in sendlist.Keys do begin //do processing //... //remove current object after processing sendlist.Remove(seq); end; The destructor of my TmesData objects never gets called. I must miss something obvious.
×