If you really are calling draw() only once, which ends up calling getTextRect only twice in total, then you shouldn’t see memory usage increase more and more the longer your program runs. If that’s the case then the memory leak is probably somewhere else.
If what you see is instead just that the memory usage does not drop down to near zero after calling cleanup() then I would not be too concerned about that. It’s pretty normal.