alllocator: no need to store structure size inside the structure
authorTim-Philipp Müller <tim.muller@collabora.co.uk>
Thu, 14 Jun 2012 23:00:12 +0000 (00:00 +0100)
committerTim-Philipp Müller <tim.muller@collabora.co.uk>
Fri, 15 Jun 2012 09:27:18 +0000 (10:27 +0100)
gst/gstmemory.c

index bc39290..c268895 100644 (file)
@@ -95,8 +95,6 @@ struct _GstAllocator
 {
   GstMiniObject mini_object;
 
-  gsize slice_size;
-
   GstMemoryInfo info;
 
   gpointer user_data;
@@ -767,7 +765,7 @@ _gst_allocator_free (GstAllocator * allocator)
   if (allocator->notify)
     allocator->notify (allocator->user_data);
 
-  g_slice_free1 (allocator->slice_size, allocator);
+  g_slice_free1 (sizeof (GstAllocator), allocator);
 }
 
 static GstAllocator *
@@ -812,7 +810,6 @@ gst_allocator_new (const GstMemoryInfo * info, gpointer user_data,
   allocator->mini_object.copy = (GstMiniObjectCopyFunction) _gst_allocator_copy;
   allocator->mini_object.free = (GstMiniObjectFreeFunction) _gst_allocator_free;
 
-  allocator->slice_size = sizeof (GstAllocator);
   allocator->info = *info;
   allocator->user_data = user_data;
   allocator->notify = notify;