Re: How to allocate new class instance on the heap?
- From: "Bruce Roberts" <ber@xxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 26 May 2005 11:39:32 -0400
<chrisspencer02@xxxxxxxxx> wrote in message
news:1117066027.187310.219810@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> Are you saying that
>
> ClassInstanceVariable := tClassName.Create {};
>
> will allocate ClassInstanceVariable on the heap? And it will not be
> automatically deallocated when the function declaring
> ClassInstanceVariable exits? OK, thank you.
No, I was just telling you how you have to go about creating a class
instance. Being the nice guy that I am ;), I also indicated how one could
retain a reference to the instance data.
tClassName.Create creates a new instance and returns a reference to the
location of the new instance's data. Instance data is always stored on the
heap.
Read the Object Pascal (Delphi) Language Reference section of the help (see
table of contents). It does a very good job of explaining the language and
how it works.
.
- References:
- How to allocate new class instance on the heap?
- From: chrisspencer02
- Re: How to allocate new class instance on the heap?
- From: Bruce Roberts
- Re: How to allocate new class instance on the heap?
- From: chrisspencer02
- How to allocate new class instance on the heap?
- Prev by Date: Re: Internam error in D2005 on compile
- Next by Date: Re: Internam error in D2005 on compile
- Previous by thread: Re: How to allocate new class instance on the heap?
- Next by thread: Re: How to allocate new class instance on the heap?
- Index(es):
Relevant Pages
|
|