On Tue, 2011-01-18 at 22:08 -0800, John Spikowski wrote:
> I was thinking that you were freeing pFunc (using it's VARPTR) rather
> than freeing the memory associated to the pointer being returned. I have
> to agree with Benoît that working with external memory (variables) and
> structures are a 'at your own risk' task in Gambas. (rules vary by what
> your trying to access)
> 

Hmm.. ok i see maybe the name of external function made a confusion.

Extern free_ptr(ptr As Pointer) In "libc:6" Exec "free"

the name of C function is free() but this name is also a Gambas3 word.

so i declare the external function with different name.

i choose as name free_ptr(ptr As Pointer), a better name would be
free_pointer(pointer As Pointer) or free_a_c_pointer(pointer As
Pointer)  

Here there is no relevance with VarPtr.

Ptr is just an abbreviation for Pointer word which we can use in code.


-- 
Regards,
Demosthenes Koptsis.


------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to