Bugfix: Memory leak fixed.

git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@394 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
pull/1/head
kimmi 2009-04-18 23:41:50 +00:00
parent 7ed81a7273
commit 85a14fa265
2 changed files with 4 additions and 7 deletions

View File

@ -216,7 +216,7 @@ void ObjFileParser::copyNextLine(char *pBuffer, size_t length)
// -------------------------------------------------------------------
// Get values for a new 3D vector instance
void ObjFileParser::getVector3(std::vector<aiVector3D*> &point3d_array)
void ObjFileParser::getVector3(std::vector<aiVector3D> &point3d_array)
{
float x, y, z;
copyNextWord(m_buffer, BUFFERSIZE);
@ -228,7 +228,7 @@ void ObjFileParser::getVector3(std::vector<aiVector3D*> &point3d_array)
copyNextWord(m_buffer, BUFFERSIZE);
z = (float) fast_atof(m_buffer);
point3d_array.push_back(new aiVector3D(x,y,z));
point3d_array.push_back( aiVector3D( x, y, z ) );
//skipLine();
m_DataIt = skipLine<DataArrayIt>( m_DataIt, m_DataItEnd, m_uiLine );
}

View File

@ -47,9 +47,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <map>
#include "../include/aiTypes.h"
/*struct aiVector2D_t;
struct aiVector3D_t;*/
namespace Assimp
{
@ -89,7 +86,7 @@ private:
/// Method to copy the new line.
void copyNextLine(char *pBuffer, size_t length);
/// Stores the following 3d vector.
void getVector3( std::vector<aiVector3D*> &point3d_array );
void getVector3( std::vector<aiVector3D> &point3d_array );
/// Stores the following 3d vector.
void getVector2(std::vector<aiVector2D*> &point2d_array);
/// Stores the following face.