mohammads
mohammads

Reputation: 228

QPlainTextEdit memory leak

I wrote a simple app with Qt 5.9.6, I ran that and wondered the used memory is growing. After tracing/debugging my application, I realized something about QPlainTextEdit !!!

The memory leak was for a qplaintextedit as a scratchpad in my app, but after every use of that, I used the clear() function to blank it for next use.

But the used memory by that scratchpad woudn't be released!

I decided to test it

I opened a new project, containing a QPlainTextEdit & a QPushButton(to use clear() function).

I tried delete, static allocation, dynamic allocation..., many ways to manage that, but no different!

I found something in here, but it couldn't solve the problem.

Is this a bug in QPlainTextEdit or I'm doing wrong?

Upvotes: 0

Views: 243

Answers (1)

cyberpunker
cyberpunker

Reputation: 49

I think it is Qt's defection.

You can run the Appliction.exe example of Qt , it also has the same problem.

Upvotes: 1

Related Questions