Skip to content

Commit

Permalink
Fix potential memory leak
Browse files Browse the repository at this point in the history
  • Loading branch information
dtarakanov1 committed Sep 18, 2018
1 parent 6ea2068 commit bb49334
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 1 addition & 3 deletions Baikal/SceneGraph/inputmap.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ namespace Baikal
using Ptr = std::shared_ptr<InputMap>;
enum class InputMapType
{
kConstantFloat3 = 0, // Holds constant float3 value.
kConstantFloat3 = 0, // Holds constant float3 value.
kConstantFloat, // Holds constant float value
kSampler, // Samples value from provided texture
kAdd, // a + b
Expand Down Expand Up @@ -82,7 +82,5 @@ namespace Baikal
virtual void GetLeafs(std::set<Ptr> &leafs) {};
// Checks if object is leaf or not
virtual bool IsLeaf() const { return false;}

virtual ~InputMap() { }
};
}
2 changes: 2 additions & 0 deletions BaikalStandalone/Application/uber_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -815,6 +815,8 @@ UberNode::UberNode(InputMap::Ptr input_map, UberNode::Ptr parent)
:m_input_map(input_map), m_parent(parent), m_id(m_next_id++)
{ }

UberNode::~UberNode() = default;

UberNode_Arg::UberNode_Arg(InputMap::Ptr input_map, UberNode::Ptr parent)
: UberNode(input_map, parent)
{
Expand Down
2 changes: 2 additions & 0 deletions BaikalStandalone/Application/uber_node.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ class UberNode

int GetParentId() const;

virtual ~UberNode();

protected:
UberNode(InputMap::Ptr input_map, UberNode::Ptr parent);

Expand Down

0 comments on commit bb49334

Please sign in to comment.