<div dir="ltr">Hi Alvaro,<div><br></div><div>As pointed by Christian all your problems are pure C++ problems. I recommend you to learn more C++ and how to code to avoid leaks and memory corruption and for OSG I recommend you get a copy of the Quick Start Guide.</div><div><br></div><div>Doing a quick review I've discovered that your are returning a pointer from a local variable created inside "crearMultipleVenata" so after the function returns that viewer is destroyed!. Use a raw pointer or even better a osg::ref_ptr<>, but really you need to read about smart pointers in C++ and also how the smart pointers are used in OSG :)</div><div><br></div><div>Also I recommend as a general rule use always English in the code (even for the comments), using Spanish will be easy for you but others might don't understand the meaning of the methods.</div><div><br></div><div>Regards,</div><div>Rafa.</div><div><br></div><br><div class="gmail_quote"><div dir="ltr">El jue., 30 jul. 2015 a las 12:31, alvaro ginestar rodriguez (<<a href="mailto:alvaroginestar@hotmail.com">alvaroginestar@hotmail.com</a>>) escribió:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div dir="ltr"><span style="color:rgb(68,68,68);font-size:15px;line-height:21.2999992370605px;background-color:rgb(255,255,255)">hi everyone !!. i have a problem with return viewer in a fuction, and to add the viewer of the fuction in de main.</span> </div></div>
_______________________________________________<br>
osg-users mailing list<br>
<a href="mailto:osg-users@lists.openscenegraph.org" target="_blank">osg-users@lists.openscenegraph.org</a><br>
<a href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org" rel="noreferrer" target="_blank">http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org</a><br>
</blockquote></div></div>