Welcome, Guest
Username: Password: Remember me
Tools, Runtimes binaries, Toolchains, OS Scripts and OS Libraries, discussions, problems and suggestion
  • Page:
  • 1

TOPIC:

Lazrus Fileutil Unit 2 years 2 months ago #15143

  • Chad Adams
  • Chad Adams's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 53
  • Thank you received: 0
How can i get the Lazarus fileutil unit to work in CodeTyphoon (or is there some alternative unit?)

Please Log in or Create an account to join the conversation.

Lazrus Fileutil Unit 2 years 2 months ago #15147

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4425
  • Thank you received: 1072
just
add lazfileutils to your unit
look at codetyphon\typhon\components\BaseUtils\
folder
PilotLogic Architect and Core Programmer

Please Log in or Create an account to join the conversation.

Last edit: by Sternas Stefanos.

Lazrus Fileutil Unit 9 months 2 weeks ago #16717

  • Kristof Subryan
  • Kristof Subryan's Avatar
  • Offline
  • New Member
  • New Member
  • Posts: 2
  • Thank you received: 0
I found a memory leak in fileutil.inc
in
procedure TFileSearch.Search(const ASearchPath: Stringl const ASearchMask: String; .....

begin
  if FSearching then RaiseSearchingError;
  {$ifdef windows}
  MaskList := TWindowsMaskList.Create(ASearchMask, FMaskSeparator, CaseSensitive);
  {$else}
  MaskList := TMaskList.Create(ASearchMask, FMaskSeparator, CaseSensitive);
  {$endif}
  MaskList := TMaskList.Create(ASearchMask, FMaskSeparator, CaseSensitive);        <
  LEAK!!!!!
  // empty mask = all files mask

 

Please Log in or Create an account to join the conversation.

Lazrus Fileutil Unit 9 months 2 weeks ago #16719

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4425
  • Thank you received: 1072
Thanks Sir
we will test and fix

We fix this in CT 7.7 Final

  if FSearching then RaiseSearchingError;
  {$ifdef windows}
  MaskList := TWindowsMaskList.Create(ASearchMask, FMaskSeparator, CaseSensitive);
  {$else}
  MaskList := TMaskList.Create(ASearchMask, FMaskSeparator, CaseSensitive);
  {$endif}
  // empty mask = all files mask
  if MaskList.Count = 0 then
    FreeAndNil(MaskList);
PilotLogic Architect and Core Programmer

Please Log in or Create an account to join the conversation.

Last edit: by Sternas Stefanos.
  • Page:
  • 1