Subject Re: [IBO] IBO 4.2 Gc with D3 and Report Builder
Author Geoff Worboys
> procedure TDataSet.FreeBookmark(Bookmark: TBookmark);
> StrDispose(Bookmark); // here occurs the exception

> in D6 this line is:

> MemFree(Bookmark);

Memory should be freed using the method that corresponds to how it was
allocated. I doubt very much that changing anything in the VCL will
assist you. I think the more likely problem is that something has
already freed the bookmark, making the given reference invalid.

Without having the app to work with it is difficult to guess. However
you could try calling the pipeline method that frees all bookmarks
prior to closing the query. (In RB5 there is a method called
FreeBookmarks). This may actual result in you getting the error
earlier - in which case perhaps ClearBookmarkList may resolve your
problem (but beware of introducing memory leaks).

If you cannot work around the problem by using Pipline.FreeBookmarks
(in advance of closing the query) then I suggest placing a breakpoint
in the pipeline code (or the TDataSet.FreeBookmark code) to see why
the references have become invalid. (I am presuming that something is
trying to free bookmarks that have already been freed.)


Geoff Worboys
Telesis Computing