Incus J 10 Posted July 21, 2020 I'm trying to install a package EmbeddedWebBrowser_Tokyo.bpl in Delphi 10.4 which contains the following procedure: procedure TIEParser.Stop; begin if Assigned(Doc) then Doc := nil; if Assigned(All) then All := nil; FreeAndNil(Element); FUrl := EmptyStr; FBusy := False; Finalize; end; When Building I get a compiler error at FreeAndNil(Element). Incompatible types: TObject and TElementInfo. This makes sense in that Element is a TElementInfo, which is a record, not a TObject. That suggests FreeAndNil may be the wrong thing to use here - but what could I use instead? (not being sure exactly what the author's intention is). I realise _Tokyo indicates the package is for an older release, but it is the most up to date version of the package I can find at present. I had it installed and working OK in Delphi 10.3 - so hopefully I just need to tweak a couple of things? Share this post Link to post
Stefan Glienke 2002 Posted July 21, 2020 I just had a glimpse over the source but I think the line can just be removed. There is nothing to deallocate and any managed fields in the record will be finalized automatically from the RTL. Share this post Link to post
Incus J 10 Posted July 23, 2020 Thank you Stefan - I'll try commenting out the line and see what happens. Share this post Link to post