224 |
|
{calculate length of event parameter block, setting initial length to include version |
225 |
|
and counts for each argument} |
226 |
|
|
227 |
< |
if FEventBuffer <> nil then FreeAndNil(FEventBuffer); |
228 |
< |
if FResultBuffer <> nil then FreeAndNil(FResultBuffer); |
227 |
> |
if FEventBuffer <> nil then |
228 |
> |
begin |
229 |
> |
FreeMem( FEventBuffer); |
230 |
> |
FEventBuffer := nil; |
231 |
> |
end; |
232 |
> |
if FResultBuffer <> nil then |
233 |
> |
begin |
234 |
> |
FreeMem( FResultBuffer); |
235 |
> |
FResultBuffer := nil; |
236 |
> |
end; |
237 |
|
|
238 |
|
FEventBufferLen := 1; |
239 |
|
for i := 0 to FEvents.Count - 1 do |
250 |
|
IBAlloc(FResultBuffer,0,FEventBufferLen); |
251 |
|
if FResultBuffer = nil then |
252 |
|
begin |
253 |
< |
FreeAndNil(FEventBuffer); |
253 |
> |
FreeMem(FEventBuffer); |
254 |
> |
FEventBuffer := nil; |
255 |
|
Exit; |
256 |
|
end; |
257 |
|
FillChar(FResultBuffer^,FEventBufferLen,0); |