![]() |
AW: Zugriffsverletzung beim TObjectDictionary.Add
Zitat:
Lösung kann auch so aussehen:
Delphi-Quellcode:
Dann ruft das JSON dings den richtigen ctor auf.
TUserRoleRightDict = class(TObjectDictionary<Integer, TUserRoleRight>)
constructor Create; overload; end; constructor TUserRoleRightDict.Create; begin inherited Create; end; P.S. Das Problem wird übrigens auch bei TObjectList<T> passieren. Denn dann wird der parameterlose ctor von TList<T> aufgerufen und dann bleibt FOwnsObjects auf false. Nur als Hinweis, falls mal irgendwo massive Leaks auftreten. :wink: |
AW: Zugriffsverletzung beim TObjectDictionary.Add
Zitat:
|
Alle Zeitangaben in WEZ +1. Es ist jetzt 15:03 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz