[Xfc-dev] pointers vs. references in XFC

Brian J. Tarricone bjt23 at cornell.edu
Fri Mar 4 00:53:11 CET 2005


Hi Jeff,

Going through the tutorials and examples on the site (damn!  so much 
information - well done!), I noticed that most functions take object 
references as parameters, rather than pointers.  However, widgets are 
still created with operator new, so it seems that, aside from use of 
smart pointers, we're usually going to have pointers to widgets, but we 
have to do things like this:

a_gtk_box->pack_start(*button, ...);

It seems kinda annoying to me to always have to dereference the widget 
pointer when passing it to functions.  I'm just curious to know why this 
approach was taken.

Regards,
Brian



More information about the Xfc-dev mailing list