RobotStudio event

disposing - memory leak detection

Options
Hello,
In my FP app Iam using dispose method in such metter(example below) but Iam not sure if this is the correct way.Iam using also numPad,combo boxes and labels which i don't dispose. Am I suppoused to dispose them as well?

 

When trying to detect the memory leak the second method described in the manual is not working.

(1. log off on the abb menu

2. write: fpcmd_enable_console_output

3.write fpcmd "-a")

it never shows the number of instances....

 

It shows something like this instead:fpcmd_enable_console_output < >

followed by the option of three parameters. for console output.....

 

Am I doing something wrong?

 

  

 

...

c =
New Controller
TRY

st1 = c.Rapid.GetRapidData("T_ROB1", "Module1", "stString1")
stDate =
DirectCast(st1 .Value, RapidDomain.String)

TpsLabel12.Text = stDate

CATCH
'something.....
ENDTRY
If
Not st1 Is Nothing Then
st1 .Dispose()
st1 =
Nothing
End If

 

Comments

  • carlosmtz2000
    Options

    In the pseudo-code, dispse the controller also ..  :)

    Controls (like NumPad, labels, etc) will be disposed as long as they belong to the TpsForm . The TpsForm will call dispose on its children controls.

     

    BR ...
    Carlos Martinez
    ABB