Menu

#31 Memmory Leak - TextImage fields

1.0
closed
aliks-os
None
2015-03-01
2015-02-28
Mauro Anjo
No

Hello!

I found a memmory leak on the handling of TextImage fields. On sectionValueImage function you create a QImage with new and then pass it through as a reference and the pointer is never released.

Theres no need to dynamic allocation of QImage in this case so I suggest to change the function as follows:

QImage QtRPT::sectionValueImage(QString paramName) {
    QImage paramValue;
    paramName.replace("[","");
    paramName.replace("]","");

    emit setValueImage(m_recNo, paramName, paramValue, m_pageReport);
    return paramValue;
}

Discussion

  • aliks-os

    aliks-os - 2015-03-01

    Thank you, fixed it

     
  • aliks-os

    aliks-os - 2015-03-01
    • status: open --> closed
     

Log in to post a comment.

MongoDB Logo MongoDB