Since, the objects created inside the myFunction will scope out at the end of myFunction
No, they won't. This is not C++. All objects are created on the heap and remain in existence until garbage collectible.
Also, you haven't declared op_line
anywhere in your pseudocode, so I assume it is being retained between method calls, and I guess that is your memory leak. I mean there is no way you should have a single character array consisting of > 100 million bytes, which is what the "small" heap dump says you have.