# Scripting Console Class Instance Destruction Incomplete

**URL:** <https://forum.inductiveautomation.com/t/scripting-console-class-instance-destruction-incomplete/22331>\
**Category:** Ignition\
**Tags:** python, scripting\
**Created:** [February 4, 2019, 8:45pm UTC](https://forum.inductiveautomation.com/t/scripting-console-class-instance-destruction-incomplete/22331 "2019-02-04T20:45:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![cmaynes](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmaynes/32/6852_2.png) [@cmaynes](https://forum.inductiveautomation.com/u/cmaynes)\
**Post date:** [February 4, 2019, 8:45pm UTC](https://forum.inductiveautomation.com/t/scripting-console-class-instance-destruction-incomplete/22331/1 "2019-02-04T20:45:54Z")

</div>

I have a class that opens a socket and I am running this in the script console.  
When I hit the Clear button or the Reset button, I can no longer access the class instance and I get a name error when I try to in the shell. The problem is that the socket connection remains open and locks up the device I am connecting to.

I use the **del** and **exit** functions in the class to ensure the connection is closed, but I think the script console isn’t properly disposing of the object instance.

Can other confirm this is a problem?

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [February 4, 2019, 9:01pm UTC](https://forum.inductiveautomation.com/t/scripting-console-class-instance-destruction-incomplete/22331/2 "2019-02-04T21:01:38Z")

</div>

Thanks, we’ll look into it.
