Skip to content
This repository has been archived by the owner on Jan 2, 2023. It is now read-only.

memory is leak? #51

Open
huqiuyun opened this issue Nov 20, 2022 · 0 comments
Open

memory is leak? #51

huqiuyun opened this issue Nov 20, 2022 · 0 comments

Comments

@huqiuyun
Copy link

QList QWin32PrintEnginePrivate::queryResolutions() const
{
// Read the supported resolutions of the printer.
QList list;

DWORD numRes = DeviceCapabilities(reinterpret_cast<const wchar_t *>(name.utf16()),
                                  reinterpret_cast<const wchar_t *>(port.utf16()),
                                  DC_ENUMRESOLUTIONS, 0, 0);
if (numRes == (DWORD)-1)
    return list;

LONG *enumRes = (LONG*)malloc(numRes * 2 * sizeof(LONG));

//-----------------\
the enumRes not free ?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

1 participant