westy100697
asked on
Help - Get Error after exit D3 APP??(MDI)
My Question is.....
I have come across a good solution for using MDIChild forms in Dll's. However it requires you to Build your Project EXE and Dll's with Runtime Packages. Now the program works beautifully releasing forms (MDICHilds) as it should, but as soon as I try and Exit out I get an Access Violation in VCL30.DPL .. I have tried to block this using exceptions in the FormClose and FormDestroy events of my Mainform which is an MDIForm. Anyone got any ideas on how to stop the Access violation problem as it chews memory big time.
Regards Westy
I have come across a good solution for using MDIChild forms in Dll's. However it requires you to Build your Project EXE and Dll's with Runtime Packages. Now the program works beautifully releasing forms (MDICHilds) as it should, but as soon as I try and Exit out I get an Access Violation in VCL30.DPL .. I have tried to block this using exceptions in the FormClose and FormDestroy events of my Mainform which is an MDIForm. Anyone got any ideas on how to stop the Access violation problem as it chews memory big time.
Regards Westy
ASKER
Hi Vik,
I have been using release. This is a technique I use from my D1 days. However I will try free and see if it works.
WESTY :)
I have been using release. This is a technique I use from my D1 days. However I will try free and see if it works.
WESTY :)
Release is not a perfect method,..try changing that to Free here is why,...
When you call FREE method here is what the procedure does,,,,
procedure Free;
begin
if Form <> nil then
Form.Destroy;
end;
So it first checks if the object has been freed and if not than it is freed, otherwise it it's not there then the compiler goes to the next method....
Viktor Ivanov
When you call FREE method here is what the procedure does,,,,
procedure Free;
begin
if Form <> nil then
Form.Destroy;
end;
So it first checks if the object has been freed and if not than it is freed, otherwise it it's not there then the compiler goes to the next method....
Viktor Ivanov
ASKER
Vik,
Yeh I ttried the free method and for some reason it causes even more problems. So what I am thinking after all this is to revert the Dll's (the forms in the Dll's) back to SDI's or just fsNormal. I think it will be much easier at this stage and I will have to spend some more time down the track researching this a bit more. Anyway appreciate your help and if you lock the question I will give you the points because you were at least trying to help me out.
Thanks
WESTY 8-)
Yeh I ttried the free method and for some reason it causes even more problems. So what I am thinking after all this is to revert the Dll's (the forms in the Dll's) back to SDI's or just fsNormal. I think it will be much easier at this stage and I will have to spend some more time down the track researching this a bit more. Anyway appreciate your help and if you lock the question I will give you the points because you were at least trying to help me out.
Thanks
WESTY 8-)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Vik,
I have got a couple of e-mail adressed you can contact me on also and probably the best one is boabyte@ozemail.com.au. I will give you the points because of the effort you have put in. Once again thanks.
Regards WESTY
I have got a couple of e-mail adressed you can contact me on also and probably the best one is boabyte@ozemail.com.au. I will give you the points because of the effort you have put in. Once again thanks.
Regards WESTY
Are freeing the forms after you create them???
//Vik