RobotStudio event

Dispose Record Data

Options

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,
 
 






Comments

  • RussD
    Options
    You need to dispose of ATask, AModule ARapidData  and ARapidDataType if it supports dispose
    Russell Drown