VirtualBox

Changeset 36842 in vbox


Ignore:
Timestamp:
Apr 26, 2011 7:54:09 AM (14 years ago)
Author:
vboxsync
Message:

Main/Metrics: Memory leak fixes

Location:
trunk/src/VBox/Main
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/include/Performance.h

    r36839 r36842  
    4444    public:
    4545        CircularBuffer() : mData(0), mLength(0), mEnd(0), mWrapped(false) {};
     46        ~CircularBuffer() { if (mData) RTMemFree(mData); };
    4647        void init(ULONG length);
    4748        ULONG length();
  • trunk/src/VBox/Main/src-server/PerformanceImpl.cpp

    r36839 r36842  
    509509                  "returned %d values.\n", (*it)->getName(), length));
    510510        memcpy(retData.raw() + flatIndex, values, length * sizeof(*values));
     511        RTMemFree(values);
    511512        Bstr tmp((*it)->getName());
    512513        tmp.detachTo(&retNames[i]);
Note: See TracChangeset for help on using the changeset viewer.

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