RobotStudio event

C# application slowing down using PC SDK

Hi

We have a C# application that uses PC SDK to communicate with an IRB 120. Over a period of an hour or two, the C# application screen refreshes slow down and eventually it will crash. Task Manager indicates very low CPU and Memory usage which remains steady over time, so am wondering if anyone else has experienced this?

Thanks
David

Comments

  • Do you call "Dispose" method to avoid memory leaks? You can read more about this on the chapter "Accessing the controller"  in PC SDK manual.

    protected override void Dispose(bool disposing)
            {
                if (!IsDisposed)
                {
                    try
                    {
                        if (disposing)
                        {
                            //ToDo: Call the Dispose method of all FP SDK instances that may otherwise cause memory leak
                        }
                    }
                    finally
                    {
                        base.Dispose(disposing);
                    }
                }
            }
  • Thank you Egor for your suggestions.
    I'm not currently explicitly disposing of objects but am doing so implicitly (I think) by using the following:
    using (Mastership m = Mastership.Request(rpdController.Rapid))
    {
    }
    On reading again the chapter you mentioned, I noticed the rpdController.ReleaseUnmanagedResources method which I might try.

    Regards
    David