diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2014-05-31 15:06:09 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2014-05-31 15:06:09 -0400 |
commit | 74323fa54010d29737281579e4f3b4038da94989 (patch) | |
tree | cb0c97a58d5d103898b412be27f22f6893eb44ec /libdimension-python/dimension.pyx | |
parent | c42fd6547afed0b65260ae6a8a07cf9dcf084b67 (diff) | |
download | dimension-74323fa54010d29737281579e4f3b4038da94989.tar.xz |
texture: Use pool.
Diffstat (limited to 'libdimension-python/dimension.pyx')
-rw-r--r-- | libdimension-python/dimension.pyx | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/libdimension-python/dimension.pyx b/libdimension-python/dimension.pyx index 7c951d6..2ab683d 100644 --- a/libdimension-python/dimension.pyx +++ b/libdimension-python/dimension.pyx @@ -963,7 +963,7 @@ cdef class Texture(_Transformable): pigment -- the Pigment for the texture, or a color (default: None) finish -- the Finish for the texture (default: None) """ - self._texture = dmnsn_new_texture() + self._texture = dmnsn_new_texture(_get_pool()) if pigment is not None: self.pigment = Pigment(pigment) @@ -971,9 +971,6 @@ cdef class Texture(_Transformable): if finish is not None: self.finish = finish - def __dealloc__(self): - dmnsn_delete_texture(self._texture) - property pigment: """The texture's pigment.""" def __get__(self): @@ -1005,7 +1002,6 @@ cdef Texture _Texture(dmnsn_texture *texture): """Wrap a Texture object around a dmnsn_texture *.""" cdef Texture self = Texture.__new__(Texture) self._texture = texture - DMNSN_INCREF(self._texture) return self ############# @@ -1095,12 +1091,10 @@ cdef class Object(_Transformable): else: return _Texture(self._object.texture) def __set__(self, Texture texture): - dmnsn_delete_texture(self._object.texture) if texture is None: self._object.texture = NULL else: self._object.texture = texture._texture - DMNSN_INCREF(self._object.texture) property interior: """The object's Interior.""" @@ -1526,9 +1520,7 @@ cdef class Scene: def __get__(self): return _Texture(self._scene.default_texture) def __set__(self, Texture texture not None): - dmnsn_delete_texture(self._scene.default_texture) self._scene.default_texture = texture._texture - DMNSN_INCREF(self._scene.default_texture) property default_interior: """The default Interior for objects.""" def __get__(self): |