Dispose Record Data
Options
Jaaahhh
✭
Hello,
I am confused....! What do I do wrong??
I use the latest RAB software with VB.net.
Problem: Memory Leak
I am installing data in my application.
Code:
' ----------------------------------
' 1 x Task Leak, 1 x Datatype leak
' -------------------------------------------------------------------------------
' Create RapidData object for tCell
'---------------------------------
ATask = AController.Rapid.GetTask("MAINTASK")
AModule = AController.Rapid.GetTask("MAINTASK").GetModule("GLOBAL")
ARapidData = AModule.GetRapidData("cell")
ARapidDataType = AModule.GetRapidData("cell").DataType
''
rbt_rdCell = ARapidData
rbt_rdtCell = ARapidDataType
rbt_Cell = New tCell(rbt_rdtCell)
' -------------------------------------------------------------------------------
When I want to dispose the data I use the following code:
' --------------------------------------------------------------------------
If Not rbt_rdCell Is Nothing Then
rbt_rdCell.Dispose()
rbt_rdCell = Nothing
End If
If Not rbt_rdtCell Is Nothing Then
rbt_rdtCell.Dispose()
rbt_rdtCell = Nothing
End If
' --------------------------------------------------------------------------
Now when I close the application and look on the Com port I get the following message:
-> [fp]: Memory leak??????
~SDKDisposeBase() called for ABB.Robotics.Controllers.RapidDomain.Task [53514]
[fp]: Memory leak??????
~SDKDisposeBase() called for ABB.Robotics.Controllers.RapidDomain.RapidData [535
19]
I do not know how to get this memory leak go away.....!!
Any suggestion?
Best Regards,
0
Comments
-
You need to dispose of ATask, AModule ARapidData and ARapidDataType if it supports disposeRussell Drown0
Categories
- All Categories
- 5.4K RobotStudio
- 384 UpFeed
- 14 Tutorials
- 12 RobotApps
- 291 PowerPacs
- 406 RobotStudio S4
- 1.8K Developer Tools
- 247 ScreenMaker
- 2.7K Robot Controller
- 279 IRC5
- 46 OmniCore
- 6 RCS (Realistic Controller Simulation)
- 3 RobotStudio AR Viewer
- 736 RAPID Programming
- 15 Wizard Easy Programming
- 105 Collaborative Robots
- 3 Job listings