How to use Delphi Dlls without enabling Build with runtime packages

前端 未结 2 1818
余生分开走
余生分开走 2021-01-03 15:35

Recently i started a project with so many forms , frames and extra controls, so my application was swelling up and i am using 3 exes in my projects(all made in Delphi 2009)

相关标签:
2条回答
  • 2021-01-03 16:21

    Do not use dll's for your frames but bpl's.

    So create a new package, add the code for your frame in it. In your application, use the unit with the frame and call TFrame2.Create(Self); like you would normally do if you didn't have dll's.

    In exe:

    procedure TForm1.Button1Click(Sender: TObject);
    var
      MyFrame: TFrame2;
    begin
      MyFrame := TFrame2.Create(Tabsheet1);
      MyFrame.Parent := Tabsheet1;
    end;
    
    0 讨论(0)
  • 2021-01-03 16:24

    1) i think its natural, specially if there are alot of object/images etc. how about if you move some images/forms etc to dll as resource. then call it when needed and freed if not.

    2) try also checking memory leaks. i have same problem before, when my program starts the memory usage is getting bigger and bigger. try to use FastMM4.

    3) exclude some bpls that is not being use. because it created runtime even if you do not use it. example "InterBaseDriver;DBXMySQLDriver;dbexpress;dbxcds;VirtualTreesD12 etc.." i did not use it, so im gont to excluse it. try to know all the units u used to what bpl they belong.

    0 讨论(0)
提交回复
热议问题