Scalerichview and action load with other form
Posted: Sun Oct 13, 2013 10:56 pm
Two strange situations involving release memory resources with ScaleRichview and Action
place the form in the example ... ScaleRichView \ Demos \ ActionTest ( form3 ) loaded as fsNormal through another form1 ( for example) .
In onClose method to terminate the form3 and release it from memory , put
action : = caFree .
when the form3 is closed , it generates an exception .
If the action statement : = caFree is removed , there is no exception.
If this example were any other simple form without using ScaleRichView and action ( eg form 4 ) , to shut it down with the action statement : = caFree not occur excption and form 4 is effectively removed from memory.
This indicates that the form3 ( ScaleRichView and actions ) contains instructions as to close the form would be released from memory . But this does not happen ! After closing the form3 if you instruct to form3.visible : = true , and form3.show the form3 is being shown .
So the question is how to effectively remove the form3 memory when loaded into another form ?
Why is not free from memory ?
When you created this example using actions (srvActionsResource in the form3), and to end the close form is not necessary to release it from memory? Why?
The most curious is that the memcheck (*see instruction below*) report memory leak from srvActionsResource. You know the reason?
(*
program ActionTest;
uses
MemCheck,
Forms,
dmActionsSRV in 'dmActionsSRV.pas' {srvActionsResource: TDataModule},
Unit3 in 'Unit3.pas' {Form3};
{$R *.res}
begin
MemChk; *)
place the form in the example ... ScaleRichView \ Demos \ ActionTest ( form3 ) loaded as fsNormal through another form1 ( for example) .
In onClose method to terminate the form3 and release it from memory , put
action : = caFree .
when the form3 is closed , it generates an exception .
If the action statement : = caFree is removed , there is no exception.
If this example were any other simple form without using ScaleRichView and action ( eg form 4 ) , to shut it down with the action statement : = caFree not occur excption and form 4 is effectively removed from memory.
This indicates that the form3 ( ScaleRichView and actions ) contains instructions as to close the form would be released from memory . But this does not happen ! After closing the form3 if you instruct to form3.visible : = true , and form3.show the form3 is being shown .
So the question is how to effectively remove the form3 memory when loaded into another form ?
Why is not free from memory ?
When you created this example using actions (srvActionsResource in the form3), and to end the close form is not necessary to release it from memory? Why?
The most curious is that the memcheck (*see instruction below*) report memory leak from srvActionsResource. You know the reason?
(*
program ActionTest;
uses
MemCheck,
Forms,
dmActionsSRV in 'dmActionsSRV.pas' {srvActionsResource: TDataModule},
Unit3 in 'Unit3.pas' {Form3};
{$R *.res}
begin
MemChk; *)