Recent

Author Topic: Run application as a service or as a GUI application via command line parameters  (Read 6630 times)

Zvoni

  • Hero Member
  • *****
  • Posts: 2327
As Thaddy said:
remove HeapTrc from uses-Clause, encase your SetHeapTraceOutput with an {$IFDEF},
either in project-options check "Use HeapTrace" or compile with -gh/-glh
Run
One System to rule them all, One Code to find them,
One IDE to bring them all, and to the Framework bind them,
in the Land of Redmond, where the Windows lie
---------------------------------------------------------------------
Code is like a joke: If you have to explain it, it's bad

JD

  • Hero Member
  • *****
  • Posts: 1848
As Thaddy said:
remove HeapTrc from uses-Clause, encase your SetHeapTraceOutput with an {$IFDEF},
either in project-options check "Use HeapTrace" or compile with -gh/-glh
Run

Thanks a lot for all your suggestions. The memory leaks in the base service are now gone.

JD
Windows - Lazarus 2.1/FPC 3.2 (built using fpcupdeluxe),
Linux Mint - Lazarus 2.1/FPC 3.2 (built using fpcupdeluxe)

mORMot; Zeos 8; SQLite, PostgreSQL & MariaDB; VirtualTreeView

JD

  • Hero Member
  • *****
  • Posts: 1848
You might put heaptrc as first unit in your uses clause ?

I've removed the heaptrc unit completely and followed Zvoni and Thaddy's suggestion.

BTW it is my exisiting mORMot HTTP Server that I'm trying to convert to a service.

If anyone has some code, suggestions that they can share with me, I'll be very grateful.

Cheers,

JD
Windows - Lazarus 2.1/FPC 3.2 (built using fpcupdeluxe),
Linux Mint - Lazarus 2.1/FPC 3.2 (built using fpcupdeluxe)

mORMot; Zeos 8; SQLite, PostgreSQL & MariaDB; VirtualTreeView

JD

  • Hero Member
  • *****
  • Posts: 1848
Hi there everyone,

I've been able to get my service application up and running thanks to your suggestions and contributions.

I completely abandoned the hybrid application and opted for a simple service application.

Thanks a million.  :D

Cheers,

JD
Windows - Lazarus 2.1/FPC 3.2 (built using fpcupdeluxe),
Linux Mint - Lazarus 2.1/FPC 3.2 (built using fpcupdeluxe)

mORMot; Zeos 8; SQLite, PostgreSQL & MariaDB; VirtualTreeView

 

TinyPortal © 2005-2018