On Mon, 1 Nov 2010, Albert Astals Cid wrote:

splash/SplashFontFile.h |    5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 6751eb48dc49890f7ad8b732b3fc29a2db746ec4
Author: Albert Astals Cid <[email protected]>
Date:   Tue Nov 2 00:26:08 2010 +0000

   Make the destructor private

   You are not supposed to call it, you should call unref

then, why do you redefine it ? It is very rare (and imho very dangerous) to explicitely call the destructor, btw.

Also, I note that it deletes an object that is not allocated in the constructor. It should not. It's up to the user to destroy idA which is passed to the constructor, not the destructor.

Vincent Torri


diff --git a/splash/SplashFontFile.h b/splash/SplashFontFile.h
index f2b4570..8945be2 100644
--- a/splash/SplashFontFile.h
+++ b/splash/SplashFontFile.h
@@ -12,7 +12,7 @@
// under GPL version 2 or later
//
// Copyright (C) 2006 Takashi Iwai <[email protected]>
-// Copyright (C) 2008 Albert Astals Cid <[email protected]>
+// Copyright (C) 2008, 2010 Albert Astals Cid <[email protected]>
//
// To see a description of the changes please see the Changelog file that
// came with your tarball or type make ChangeLog if you are building from git
@@ -41,7 +41,6 @@ class SplashFontFileID;
class SplashFontSrc {
public:
  SplashFontSrc();
-  ~SplashFontSrc();

  void setFile(GooString *file, GBool del);
  void setFile(const char *file, GBool del);
@@ -56,6 +55,8 @@ public:
  int bufLen;
  GBool deleteSrc;
  int refcnt;
+private:
+  ~SplashFontSrc();
};

class SplashFontFile {
_______________________________________________
poppler mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/poppler


_______________________________________________
poppler mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/poppler

Reply via email to