tag:blogger.com,1999:blog-6977069.post7054986266076544559..comments2022-10-27T11:40:01.409+02:00Comments on Hallvard's Blog: Hack#17: Virtual class variables, Part IIHallvards New Bloghttp://www.blogger.com/profile/09527199955524812466noreply@blogger.comBlogger9125tag:blogger.com,1999:blog-6977069.post-2900829054868209372019-11-04T19:03:05.121+01:002019-11-04T19:03:05.121+01:00Hi! Came here from 2019 to thank you VERY VERY MUC...Hi! Came here from 2019 to thank you VERY VERY MUCH and say some things:<br /><br />1) Delphi Rio 10.3 still does not have virtual class vars<br />2) Your hack works very well in 32 bits. I have not tested in 64 bits but I think it should work or work with minor changes<br />3) Thank you VERY VERY MUCH again! You and Patrick van Logchem are genious!Magohttps://www.blogger.com/profile/12287502196625368233noreply@blogger.comtag:blogger.com,1999:blog-6977069.post-44576496577334304502012-07-12T06:02:02.481+02:002012-07-12T06:02:02.481+02:00Hi Hallvard
a real good post.... I had read it a ...Hi Hallvard<br /><br />a real good post.... I had read it a few years back but at that time it was way above my level and I was sort of lost but now incidently once again I have been referred to this post of yours by someone for some specific requirement and it looks like a real useful and efficient hack. Thanks to you and Patrick for sharing your knowledge and ideas.<br /><br />One more thing, Sunil Kumar Arora.........the digitigerhttps://www.blogger.com/profile/05236270569597973276noreply@blogger.comtag:blogger.com,1999:blog-6977069.post-88228718279937654352012-07-12T05:42:52.110+02:002012-07-12T05:42:52.110+02:00@Unknown
I forgot to mention that now Delphi also...@Unknown<br /><br />I forgot to mention that now Delphi also supports Class constructors and class Destructors and probably you may like to free classvars inside class DestructorsSunil Kumar Arora.........the digitigerhttps://www.blogger.com/profile/05236270569597973276noreply@blogger.comtag:blogger.com,1999:blog-6977069.post-34019118947264476452012-07-12T05:40:41.581+02:002012-07-12T05:40:41.581+02:00This comment has been removed by the author.Sunil Kumar Arora.........the digitigerhttps://www.blogger.com/profile/05236270569597973276noreply@blogger.comtag:blogger.com,1999:blog-6977069.post-54737193801999599532012-07-12T05:34:01.768+02:002012-07-12T05:34:01.768+02:00This comment has been removed by the author.Sunil Kumar Arora.........the digitigerhttps://www.blogger.com/profile/05236270569597973276noreply@blogger.comtag:blogger.com,1999:blog-6977069.post-75095597952461122812012-07-12T05:30:07.832+02:002012-07-12T05:30:07.832+02:00@Unknown
as for freeing the TClassVars, it could ...@Unknown<br /><br />as for freeing the TClassVars, it could be done at several places but the best practice IMHO is to do it in sync with the creation order. So it is being created in initialization section then it would be best to free the same in finalization section. Or if it is being created in object's constructor then same could be destroyed during the destructor of the last instance ofSunil Kumar Arora.........the digitigerhttps://www.blogger.com/profile/05236270569597973276noreply@blogger.comtag:blogger.com,1999:blog-6977069.post-24234630220784881672012-05-29T07:19:05.955+02:002012-05-29T07:19:05.955+02:00Can you comment on how the TClassVars variables ar...Can you comment on how the TClassVars variables are freedDavid Novohttps://www.blogger.com/profile/06313062706114154371noreply@blogger.comtag:blogger.com,1999:blog-6977069.post-64052378619173109542009-03-24T20:45:00.000+01:002009-03-24T20:45:00.000+01:00Although generally I dislike such "hacks", this on...Although generally I dislike such "hacks", this one is really nice. Just like you said, adding variables as some kind of meta information to classes can be useful. I think it'd be a smart language enhancement. I noticed that your approach might be the perfect solution for my "borg" classes, a construct (I never used in a real world application) to implement some kind of singletons, which Jens Gruschelhttps://www.blogger.com/profile/15101761822219917289noreply@blogger.comtag:blogger.com,1999:blog-6977069.post-28979276243053450352007-05-17T01:38:00.000+02:002007-05-17T01:38:00.000+02:00Wow. As always, an interesting post - but this ti...Wow. As always, an interesting post - but this time a much longer one! It's interesting to see these techniques used out in the wild, though I hope it's well commented...Anonymousnoreply@blogger.com