Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


Cleaning up lights, materials etc?

This topic is 5457 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

In the directx 9 sdk tutorial on directional lighting, they declare materials and lights etc, but then they don''t clean them up. Im just curious why these arn''t released or cleaned up, unlike other declarations that are cleaned up, such as the font, mesh, device etc.

Share this post

Link to post
Share on other sites
The reason they''re not cleaned up like the font, device, etc... is because materials and lights are not COM objects. COM objects require you to call their "Release" function so that everything behaves nicely. But materials and lights are just plain old C structs, so they''re automatically deleted when they go out of scope.

Hope this clears things up,

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!