Hi to all!
I have some problem with memory managment in qt script.
Who delete object without parent (=0) - QtScript, or memory leak will be???
//example of script
function testMe()
{
var user = UserManager.createUser(); //UserManager is a var of UserManager class added to script.
//user.Login = "Mike";
}
//example of script
function testMe()
{
var user = UserManager.createUser(); //UserManager is a var of UserManager class added to script.
//user.Login = "Mike";
}
To copy to clipboard, switch view to plain text mode
//class definition
{
.....
};
{
...
public slots:
createUser()
{
return new User(NULL);
}
}
class User: public QObject
{
.....
};
class UserManager: public QObject
{
...
public slots:
createUser()
{
return new User(NULL);
}
}
To copy to clipboard, switch view to plain text mode
Bookmarks