pdf-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: pdf_XXX_t variables creation (Was: [pdf-devel] time module unit test


From: gerel
Subject: Re: pdf_XXX_t variables creation (Was: [pdf-devel] time module unit test cases)
Date: Mon, 21 Apr 2008 09:43:46 -0300

 > Date: Sun, 20 Apr 2008 17:23:32 +0200
 > From: address@hidden
 > 
 > 
 >    Explaining a little bit deeper, for example glib (I am a glib fan)
 >    normally allocates the memory inside the functions and the user has
 >    to call the appropriate functions to free them, for example:
 > 
 > That is a good approach and we are using it in many of the pdf_xxx_t
 > "objects" in the library (such as pdf_stm_t or pdf_text_t).
 > 
 > To create a pdf_XXX_t variable you usually do:
 > 
 > pdf_XXX_t myxxx;
 > 
 > myxxx = pdf_xxx_new (parameters...);
 > 
 > and then, in order to dispose any used resources:
 > 
 > pdf_xxx_destroy (myxxx);
 > 
 > That schema works for both pointers and structures (heap or stack
 > memory) and the details are not exposed to the user.
 > 
 > I will change the implementation of both pdf_list and pdf_hash to
 > follow that convention.
 > 
 > 

Isn't that how it's implemented now ?

-gerel




reply via email to

[Prev in Thread] Current Thread [Next in Thread]