# Blender: fix memory leaking due to cycle refs. Thanks to Vitalii Trubchaninov for pointing this out.

git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@1230 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
This commit is contained in:
aramis_acg
2012-03-27 22:09:09 +00:00
parent 6caf98d945
commit 07841c3e13
5 changed files with 49 additions and 21 deletions

View File

@@ -1,8 +1,8 @@
/*
Open Asset Import Library (assimp)
Open Asset Import Library (ASSIMP)
----------------------------------------------------------------------
Copyright (c) 2006-2012, assimp team
Copyright (c) 2006-2010, ASSIMP Development Team
All rights reserved.
Redistribution and use of this software in source and binary forms,
@@ -18,10 +18,10 @@ following conditions are met:
following disclaimer in the documentation and/or other
materials provided with the distribution.
* Neither the name of the assimp team, nor the names of its
* Neither the name of the ASSIMP team, nor the names of its
contributors may be used to endorse or promote products
derived from this software without specific prior
written permission of the assimp team.
written permission of the ASSIMP Development Team.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
@@ -63,7 +63,11 @@ template <> void Structure :: Convert<Object> (
ReadFieldArray2<ErrorPolicy_Warn>(dest.obmat,"obmat",db);
ReadFieldArray2<ErrorPolicy_Warn>(dest.parentinv,"parentinv",db);
ReadFieldArray<ErrorPolicy_Warn>(dest.parsubstr,"parsubstr",db);
ReadFieldPtr<ErrorPolicy_Warn>(dest.parent,"*parent",db);
{
boost::shared_ptr<Object> parent;
ReadFieldPtr<ErrorPolicy_Warn>(parent,"*parent",db);
dest.parent = parent.get();
}
ReadFieldPtr<ErrorPolicy_Warn>(dest.track,"*track",db);
ReadFieldPtr<ErrorPolicy_Warn>(dest.proxy,"*proxy",db);
ReadFieldPtr<ErrorPolicy_Warn>(dest.proxy_from,"*proxy_from",db);
@@ -238,7 +242,11 @@ template <> void Structure :: Convert<Base> (
) const
{
ReadFieldPtr<ErrorPolicy_Warn>(dest.prev,"*prev",db);
{
boost::shared_ptr<Base> prev;
ReadFieldPtr<ErrorPolicy_Warn>(prev,"*prev",db);
dest.prev = prev.get();
}
ReadFieldPtr<ErrorPolicy_Warn>(dest.next,"*next",db);
ReadFieldPtr<ErrorPolicy_Warn>(dest.object,"*object",db);