Help needed with "at" method in QDjangoQuerySet

34 views
Skip to first unread message

Jirka Adam

unread,
Feb 2, 2014, 1:20:04 PM2/2/14
to qdj...@googlegroups.com
Hello,

my question is about deallocation when using QDjangoQuerySet

Say i have this method


MyClass* GetMyClass(const char* something){

    QDjangoQuerySet<MyClass> myClassSet;
    myClassSet = myClassSet.filter( QDjangoWhere("something", QDjangoWhere::Equals, something) );
    if(myClassSet.size()==0){         
         return NULL;
    }else{
        return myClassSet.at(0);
    }

}

I then continue to work with MyClass pointer returned from GetMyClass, am i correct to assume, i have to delete the pointer to MyClass?

I am sorry if this is repost, i couldnt figure out the proper keyword for searching

Reply all
Reply to author
Forward
0 new messages