VirtualBox

Ignore:
Timestamp:
Feb 14, 2007 11:03:34 AM (18 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
18614
Message:

1803: FE/Qt leaks memory on Windows

It looks like QCursor uses HCURSOR handle “as is” without copying, so it is not correct to destroy WinAPI HCURSOR just after setting cursor to console viewport.
Unfortunately QCursor will not destroy icon under HCURSOR handle during self-destruction so it is necessary:

  1. to make VBoxConsoleView class member – HCURSOR handle,
  2. to destroy HCURSOR handle after new cursor is set for viewport,
  3. to destroy HCURSOR handle if it is not required any more (upon VBoxConsoleView destruction).
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/include/VBoxConsoleView.h

    r382 r896  
    8383
    8484    void onFullscreenChange (bool on);
    85    
     85
    8686    void fixModifierState (LONG *codes, uint *count);
    8787
     
    206206    VBoxDefs::RenderMode mode;
    207207
     208#if defined(Q_WS_WIN)
     209    HCURSOR mAlphaCursor;
     210#endif
     211
    208212#if defined (VBOX_GUI_USE_REFRESH_TIMER)
    209213    QPixmap pm;
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette