[fpc-devel] RTTI and Attributes in Delphi 2010

Graeme Geldenhuys 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
> class.

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...
http://wings-of-wind.com/2009/08/17/rad-studio-2010-review-9-%E2%80%93-attributes-the-new-rtti-and-db-access/


Regards,
  - Graeme -


_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/



More information about the fpc-devel mailing list