disposing - memory leak detection
wolfino
✭✭
Hello,
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
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
0
Comments
-
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
ABB0
Categories
- All Categories
- 5.5K RobotStudio
- 396 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 250 ScreenMaker
- 2.8K Robot Controller
- 316 IRC5
- 61 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 799 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings