summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/gui/inventorywindow.cpp12
-rw-r--r--src/gui/inventorywindow.h5
-rw-r--r--src/gui/itemcontainer.cpp1
-rw-r--r--src/gui/itemshortcutcontainer.cpp1
4 files changed, 19 insertions, 0 deletions
diff --git a/src/gui/inventorywindow.cpp b/src/gui/inventorywindow.cpp
index 246219f4..a3572d4f 100644
--- a/src/gui/inventorywindow.cpp
+++ b/src/gui/inventorywindow.cpp
@@ -105,6 +105,18 @@ InventoryWindow::InventoryWindow(int invSize):
setLocationRelativeTo(getParent());
}
+InventoryWindow::~InventoryWindow()
+{
+ delete mWeightBar;
+ delete mSlotsBar;
+ delete mUseButton;
+ delete mDropButton;
+ delete mItems;
+ delete mWeightLabel;
+ delete mSlotsLabel;
+ delete mInvenScroll;
+}
+
void InventoryWindow::logic()
{
Window::logic();
diff --git a/src/gui/inventorywindow.h b/src/gui/inventorywindow.h
index 2694e90b..78d30461 100644
--- a/src/gui/inventorywindow.h
+++ b/src/gui/inventorywindow.h
@@ -49,6 +49,11 @@ class InventoryWindow : public Window, gcn::ActionListener,
InventoryWindow(int invSize = (INVENTORY_SIZE - 2));
/**
+ * Destructor.
+ */
+ ~InventoryWindow();
+
+ /**
* Logic (updates buttons and weight information).
*/
void logic();
diff --git a/src/gui/itemcontainer.cpp b/src/gui/itemcontainer.cpp
index e655d3fc..5693d001 100644
--- a/src/gui/itemcontainer.cpp
+++ b/src/gui/itemcontainer.cpp
@@ -66,6 +66,7 @@ ItemContainer::ItemContainer(Inventory *inventory, int offset):
ItemContainer::~ItemContainer()
{
mSelImg->decRef();
+ delete mItemPopup;
}
void ItemContainer::logic()
diff --git a/src/gui/itemshortcutcontainer.cpp b/src/gui/itemshortcutcontainer.cpp
index ecadd0e4..e152b03d 100644
--- a/src/gui/itemshortcutcontainer.cpp
+++ b/src/gui/itemshortcutcontainer.cpp
@@ -62,6 +62,7 @@ ItemShortcutContainer::ItemShortcutContainer():
ItemShortcutContainer::~ItemShortcutContainer()
{
mBackgroundImg->decRef();
+ delete mItemPopup;
}
void ItemShortcutContainer::logic()