Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GImage.data not nullptr after release #25

Open
trygas opened this issue Sep 18, 2018 · 0 comments
Open

GImage.data not nullptr after release #25

trygas opened this issue Sep 18, 2018 · 0 comments

Comments

@trygas
Copy link

trygas commented Sep 18, 2018

When I added this test for GImage, after the destruct function called, the data pointer are not equal with nullptr. That's why?


TEST(GImageTest,CorrectRelease)
{
    GSLAM::GImage img(10,10,GSLAM::GImageType<uchar,1>::Type);
    {
        GSLAM::GImage img2=img;
    }
    EXPECT_FALSE(img.empty());
    EXPECT_EQ(1,*img.refCount);
    EXPECT_TRUE(img.data);
    img.~GImage();
    EXPECT_EQ(NULL,img.refCount);
    EXPECT_TRUE(img.data==nullptr);// FIXME: why not equal nullptr
    EXPECT_TRUE(img.empty());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant