Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


ID: 13391, Using NewInstance and FreeInstance

by Hallvard Vassbotn Email: Anonymous


Download Details
FTP  download also available
CDN Login Required to Download. (You will be redirected to the login page if you click on the Download Link)
To download this, you must have registered:
A free membership

For Delphi, Version 1.0  to 4.0 455 downloads
Copyright: All rights reserved


Size: 2,520 bytes
Updated on Mon, 31 May 1999 00:00:00 GMT
Originally uploaded on Mon, 31 May 1999 00:00:00 GMT
SHA1 Hash: 49D9960EAA86EAAAA13E225ED8E3C50ED1CD2097
MD5 Hash: 61D4C7949DD69CE6967ACCEC5D6B310F

    Explore the files in this upload

Description
This code shows how to override NewInstance and FreeInstance to take over the memory management of your objects. The example allocates an aray of objects from a pool of pre-allocated memory. This speeds up the allocation of many small objects.

This unit first appeared in my article 'The Rise And Fall of TObject' in the July 1998 issue of The Delphi Magazine (http://www.itecuk.com/delmag/). Complete discussion of the topic can be found in the article.

The article also dissects the mechanism of how objects are created and destroyed in your Delphi applications. The file D4News.Txt adds some more issues that applies to Delphi 4 and later.

   Latest Comments  View All Add New

Move mouse over comment to see the full text

Could not retrieve comments. Please try again later.

Server Response from: ETNACDC03