]> git.mxchange.org Git - simgear.git/blobdiff - simgear/scene/material/mat.hxx
Memory leak fixes from Till Busch
[simgear.git] / simgear / scene / material / mat.hxx
index a5d328b0325e329bcebe1f3ee20388f012b68737..0a0fbd13289c7781140497307ddad3fdf20b7393 100644 (file)
@@ -113,18 +113,10 @@ public:
   // Public methods.
   ////////////////////////////////////////////////////////////////////
 
-  /**
-   * Force the texture to load if it hasn't already.
-   *
-   * @return true if the texture loaded, false if it was loaded
-   * already.
-   */
-  bool load_texture (int n = -1);
-
   /**
    * Get the textured state.
    */
-  osg::StateSet *get_state (int n = -1) const;
+  osg::StateSet *get_state (int n = -1);
 
 
   /**
@@ -331,7 +323,9 @@ public:
   const SGMaterial* getMaterial() const
   { return mMaterial; }
 private:
-  SGSharedPtr<const SGMaterial> mMaterial;
+  // this cannot be an SGSharedPtr since that would create a cicrular reference
+  // making it impossible to ever free the space needed by SGMaterial
+  const SGMaterial* mMaterial;
 };
 
 void