Re: [Cppcms-users] memory
Brought to you by:
artyom-beilis
From: mawan s. <ma...@gm...> - 2015-11-13 03:19:45
|
Thankyou Marcel sorry for ask. for example i have a function void users::loadimage(std::string sid){ int width, height; Image image("../profile_images/default.png"); Geometry gtx(200,200); try { image = Image("../profile_images/profile_" + sid + ".jpg"); }catch( std::exception &ex){ BOOSTER_INFO("xone") << "file to load user profile image "; } Blob b; width = image.size().width(); height = image.size().height(); //crop image if (width < height){ image.resize("200x"); }else{ image.resize("x200"); } image.crop(gtx); image.write(&b,"png"); } is image variable allocated on stack or in new memory? and i can not delete image variable like unset variable? On Fri, Nov 13, 2015 at 12:09 AM, Marcel Hellwig <ke...@co...> wrote: > Hi Mawan, > > On 12.11.2015 13:42, mawan sugiyanto wrote: > > is there any garbage collection? > > you are the garbage collector! You on your own. > This is C++, not Java or C#. When you don't need an object, delete it, > or even better, use scopes for your advantage. > > The keywords (for you to google) are "reference vs pointer", "raw > pointer vs smart pointer" and "C++ tutorial" > > Greetings > > > > > ------------------------------------------------------------------------------ > > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > > |