In D5+, you shouldnt destroy the object inside the constructor.
- Original Message -
From: "Neven MacEwan" [EMAIL PROTECTED]
To: "Multiple recipients of list delphi" [EMAIL PROTECTED]
Sent: Tuesday, 14 November 2000 15:50
Subject: Re: [DUG]: incredible and horrible
of list delphi" [EMAIL PROTECTED]
Sent: Tuesday, 14 November 2000 15:50
Subject: Re: [DUG]: incredible and horrible. (the Code)
Juan
This should be
constructor TSpIterator.Create(InitCount: Integer);
begin
inherited Create;
if ( InitCount 0 ) then
try
I couldn't duplicate the situation in a new project, using only that unit.
The fact is that the code between the creation and the release of the objects,
makes no changes in the memory already reserved, it only access it; every
operation is achieved and no exception is raised. I'll have to
TSpIterator = class (TObject)
private
NextIndexes, PrevIndexes: array of Integer;
public
property Count: Integer read FCount;
property Current: Integer read FCurrent;
constructor Create(InitCount: Integer);
destructor Destroy; override;
procedure Next;
procedure
Separator
Subject: Re: [DUG]: incredible and horrible. (the Code)
Author: [EMAIL PROTECTED]
Date: 14/11/2000 13:16
TSpIterator = class (TObject)
private
NextIndexes, PrevIndexes: array of Integer;
public
property Count: Integer
Juan
This should be
constructor TSpIterator.Create(InitCount: Integer);
begin
inherited Create;
if ( InitCount 0 ) then
try
Reset(InitCount);
except
on E: EOutOfMemory do
MessageDlg(E.Message, mtError, [mbOk], 0);
end
end;
(not sure of the effect of