RobotStudio event

Constant running App with R. Binding

Options
Hello,
I need an advice.

 

I need to collect periodically (i.e. 1sec) data from RAPID variables.

I gues I should use RapidBindingSource but I want to run my application all the time during robot program execution. The question is: what about memory leaks then?

 

I red that binding should be disposed as it is not needed anymore. But I need to use it all the time - what then?

 

I belive there is something I don't understand about those topics 'cause i.e. the Visual FlexArc binds signals and there are no memory leaks.

 

I ask you to claryfy it a bit - I'm quite new to C# Confused

Thanks,

Wojciech W?,odarski.
Wojciech Wlodarski
PLABB

Comments

  • RussD
    Options
    The issue of memory leaks arises when you create an object but then fail to dispose of it when you are finished with it. If your application is using the data binding controls to update the UI continuously, then you are not finished with them, so you needn't worry about disposing of them until you are finished, i.e. when the app is closed. If you have many data binding sources then maybe it is a concern, but for just a few, if you dispose of them when the application is closed then it should be fine. One issue that arises when using the RAB data subscription mechanisms (not data binding) is that you are advised to remove your event handlers when your application is deactivated and re-add them when it activated. When using the data binding controls, this is taken care of for you.
    Russell Drown