Josh Posted May 20, 2017 Share Posted May 20, 2017 Just making some notes about shared pointers. You should not use these in Leadwerks 4 because they will mess up our ref-counting system: Casting shared pointers: shared_ptr<Asset> asset(Material::Load("Materials/dirt/dirt01.mat")); shared_ptr<Material> material = static_pointer_cast<Material>(asset); material->SetTexture(NULL); Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Josh Posted May 20, 2017 Author Share Posted May 20, 2017 Although these work in Lua, the GC doesn't seem to ever delete them. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.