diff --git a/changelog.txt b/changelog.txt
index 0914f23..ae7e32e 100644
--- a/changelog.txt
+++ b/changelog.txt
@@ -1,6 +1,9 @@
-ZEngine Version Log for Version 0.8.0-rc2
-$Id: changelog.txt,v 1.11 2002/12/12 04:34:18 cozman Exp $
+ZEngine Version Log for Version 0.8.0-rc3
+$Id: changelog.txt,v 1.12 2002/12/21 08:40:15 cozman Exp $
+0.8.0-rc3
+ -Fixed MAJOR memory leak when using ZImage::Attach, and in ZFont.
+ -Updated ZEngine web info. (mostly in rc2)
0.8.0-rc2
-Added path stripping to ZEngine.linux.doxygen.
diff --git a/src/ZE_ZImage.cpp b/src/ZE_ZImage.cpp
index 9cdedc7..299f4e6 100644
--- a/src/ZE_ZImage.cpp
+++ b/src/ZE_ZImage.cpp
@@ -13,7 +13,7 @@
File: ZE_ZImage.cpp
Description: Implementation source file for core ZEngine Image or Texture Object.
Author(s): James Turk, Gamer Tazar
-$Id: ZE_ZImage.cpp,v 1.6 2002/12/02 05:46:37 cozman Exp $
+$Id: ZE_ZImage.cpp,v 1.7 2002/12/21 08:40:15 cozman Exp $
\file ZE_ZImage.cpp
\brief Source file for ZImage.
@@ -59,7 +59,6 @@ void ZImage::Open(string filename)
{
SDL_Surface *image;
- Release();
image = rEngine->LoadImage(filename.c_str());
Attach(image);
}
@@ -71,8 +70,6 @@ void ZImage::OpenFromImage(SDL_Surface *image, Sint16 x, Sint16 y, Sint16 w, Sin
SDL_Rect rect;
SDL_VideoInfo *videoInfo;
- Release();
-
//either set hardware or software surface//
videoInfo = const_cast(SDL_GetVideoInfo());
@@ -98,6 +95,8 @@ void ZImage::Attach(SDL_Surface *surface)
{
GLfloat coord[4];
+ Release(); //avoid most memory leaks
+
if(surface)
{
rWidth = surface->w;
@@ -188,7 +187,7 @@ void ZImage::Bind()
void ZImage::Draw(float x, float y)
{
- Bind();
+ Bind();
glBegin(GL_TRIANGLE_STRIP);
glTexCoord2f(rTexMinX,rTexMinY); glVertex2f(x,y);