I can\'t really think of any reason why python needs the del
keyword (and most languages seem to not have a similar keyword). For instance, rather than deletin
Here goes my 2 cents contribution:
I have a optimization problem where I use a Nlopt library for it. I initializing the class and some of its methods, I was using in several other parts of the code.
I was having ramdom results even if applying the same numerical problem.
I just realized that by doing it, some spurius data was contained in the object when it should have no issues at all. After using del, I guess the memory is being properly cleared and it might be an internal issue to that class where some variables might not be liking to be reused without proper constructor.