[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

gEDA-cvs: CVS update: o_picture.c



  User: ahvezda 
  Date: 06/07/15 16:49:52

  Modified:    .        o_picture.c x_image.c
  Log:
  Bunch of fixes related to releasing gdkpixbuf memory. Removed some residual
  
  noweb lines and comments.
  
  
  
  
  Revision  Changes    Path
  1.3       +5 -5      eda/geda/gaf/gschem/src/o_picture.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: o_picture.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/o_picture.c,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -b -r1.2 -r1.3
  --- o_picture.c	15 Jul 2006 18:51:41 -0000	1.2
  +++ o_picture.c	15 Jul 2006 20:49:52 -0000	1.3
  @@ -472,7 +472,7 @@
      */
   
     if (o_current->picture->displayed_picture != NULL) {
  -    g_free(o_current->picture->displayed_picture);
  +    g_object_unref(o_current->picture->displayed_picture);
       o_current->picture->displayed_picture = NULL;
     }
     /* If it's not drawing using the background color then draw the image */
  @@ -490,7 +490,7 @@
   
       temp_pixbuf2 = gdk_pixbuf_mirror_flip(temp_pixbuf1,
   					  o_current->picture->mirrored, FALSE);
  -    g_free(temp_pixbuf1);
  +    g_object_unref(temp_pixbuf1);
   
       if (temp_pixbuf2 == NULL) {
         fprintf(stderr, "Couldn't get enough memory for mirroring the picture\n");
  @@ -504,7 +504,7 @@
                               abs(o_current->picture->screen_lower_y - 
                                   o_current->picture->screen_upper_y), 
                               GDK_INTERP_BILINEAR);
  -    g_free(temp_pixbuf2);
  +    g_object_unref(temp_pixbuf2);
   
       if (o_current->picture->displayed_picture == NULL) {
         fprintf(stderr, "Couldn't get enough memory for scaling the picture\n");
  @@ -813,7 +813,7 @@
   
   	/* Change picture attributes */
   	if (object->picture->original_picture != NULL) {
  -	  g_free(object->picture->original_picture);
  +	  g_object_unref(object->picture->original_picture);
   	  object->picture->original_picture=NULL;
   	}
   	
  @@ -842,7 +842,7 @@
     }
     
     g_free ((char *) selected_filename);
  -  g_free(pixbuf);
  +  g_object_unref(pixbuf);
     w_current->page_current->CHANGED=1;
   
     i_allow_expose();
  
  
  
  1.22      +3 -3      eda/geda/gaf/gschem/src/x_image.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: x_image.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/x_image.c,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -b -r1.21 -r1.22
  --- x_image.c	15 Jul 2006 18:51:41 -0000	1.21
  +++ x_image.c	15 Jul 2006 20:49:52 -0000	1.22
  @@ -300,7 +300,7 @@
       if (filetype != NULL)
         g_free(filetype);
       if (pixbuf != NULL)
  -	  g_free(pixbuf); 
  +      g_object_unref(pixbuf); 
     }
     else {
       fprintf(stderr, "x_image_lowlevel: Unable to get pixbuf from gschem's window.\n");
  @@ -701,10 +701,10 @@
     }
   
     if (toplevel.window != NULL) {
  -    g_free(toplevel.window);
  +    g_object_ref(toplevel.window);
     }
     if (toplevel.backingstore != NULL) {
  -    g_free(toplevel.backingstore);
  +    g_object_ref(toplevel.backingstore);
     }
   
     return(pixbuf);
  
  
  


_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs