Safe-casting Pointers
You cannot safe-cast a pointer. This will fail:ptr as TProjectYou can only cast pointers the unsafe way:TProject(ptr)That is, unless you use this neat trick:TObject(ptr) as TProjectThis will also catch programming errors, specifically a pointer that doesn’t point to an object. --- Published under ...http://feeds.feedburner.com/~r/delph...~4/8akpZ74f9_M
More... |
Alle Zeitangaben in WEZ +1. Es ist jetzt 18:06 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz