[fpc-devel] RTTI and Attributes in Delphi 2010
graemeg.lists at gmail.com
Mon Aug 17 23:30:12 CEST 2009
2009/8/16 Michael Van Canneyt <michael at freepascal.org>:
> However, it's not so spectacular: Attributes are simply old .NET stuff they
> ported to Win32. Seems they had to use a workaround through an attribute
Yes you have to create a descendant of TCustomAttribute when you want
to add any attribute to a class. I was curious as to who is
responsible for instantiating that class and when does it get freed.
It gets instantiated when you query with RTTI and you are responsible
for freeing that class.
Here is some more information...
- Graeme -
fpGUI - a cross-platform Free Pascal GUI toolkit
More information about the fpc-devel