Click here to Skip to main content
14,882,036 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello everybody. I have a problem with allocating system::drawing::bitmap in function.

C#
void image_warp::preview(Bitmap ^ newpic)
{
    if(newpic!=nullptr)
        delete newpic;
    newpic=gcnew Bitmap(pic_processed);
}


bitmap is allocated and "usable" in function but when app skips back to main it is not allocated anymore. Of course I would use "&" in simpler times but seem that it does not work for managed pointers. I tried some google-ing but struggled to get any help. I know that the solution is simple but I have no idea what the correct syntax is. Thanks in advance
Posted

1 solution

See here[^]; your call does not seem to be the correct syntax.
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900