+2  A: 

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.

XBasic3000
i used fastmm4 but not worked properly
Vibeeshan
when i included all those objects and compiled inside the exe it only took 2000 kb of memusage ,so i think all the problem are with runtime bpls
Vibeeshan
just tell me how to implement this code without selecting build with runtime in -_> project options | packages
Vibeeshan
@Vibeeshan maybe because you added all the bpl. try 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.
XBasic3000
+1  A: 

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;
The_Fox
Hey sorry , i cant use bpl because other part of the software is written in vb, so i must use dlls
Vibeeshan
@Vibeeshan: I don't think it is possible to use TFrames with VB
The_Fox
not tframes but variables in this dll
Vibeeshan