Vote UpVote

TRttiContext.Create() & TRttiContext.Free()

Rob's Technology Corner – I thought I needed to take a break from the normal articles to explain why I callTRttiContext.Create() and TRttiContext.Free() when in fact you don't need too.Yes you don't need to do it, but yet I do... Why?First off lets look at the implementation of both.class function TRttiContext.Create: TRttiContext;begin Result.FContextToken := nil;end;procedure TRttiContext.Free;begin FContextToken := nil;end;At first glance there is nothing special, FContextToken is set to NIL in both cases.So what does setting FContextToken to NIL really do?We all know that Delphi currently does not have any Garbage ...
Favorite? Off-Topic? Robert Love @ 2009-09-16 12:21


Visits: 394
Votes: 4
Favorites: 0
Off-Topic: 0

Visits by Source

User Actions

Users who voted for this posting

Charles Ardour
Neville Cook
Contact us to advertise on DelphiFeeds.com

Community Links

Torry Firebird News


Please login or register to use this functionality.
(click on this box to dismiss)