Wrox Home  
Search P2P Archive for: Go

  Return to Index  

gtkplus_gnome thread: C++ to C code conversion


Message #1 by "Carl Sappenfield" <csappenf@e...> on Sat, 23 Dec 2000 01:41:54 -0000
I'm trying to convert some C++ utilities I wrote to C so I can use
straight GTK+.  My problem is, I have classes which dynamically allocate
memory.  I can change the classes to structs, but if I have a function
which returns such a struct, how do I free the memory without a
destructor?  It seems I need to make the pair free and return atomic, but
I can't think of how to lock the whole heap.
I realize I can probably kludge the whole thing by using gcc support for
variable length arrays, but I'ld rather know what I'm doing.
Thanks,
Carl

--- 
NEED TECHNICAL TIPS, TOOLS, AND INSIGHTS?  Is FREE okay?
Visit EarthWeb for the latest in IT Management, Software Development, 
Web Development, Networking & Communications, and Hardware & Systems.  
Click on http://www.earthweb.com for FREE articles, tutorials,
and discussions from the experts.
---
You are currently subscribed to gtkplus_gnome as: $subst('Recip.EmailAddr')
To unsubscribe send a blank email to leave-gtkplus_gnome-$subst('Recip.MemberIDChar')@p2p.wrox.com

  Return to Index