Jump to content
  • Advertisement

Archived

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

Yaskil

Releasing Problem

This topic is 6201 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

i have written a new ddraw7 class.it has members m_lpdd (direct draw obj) m_lpddsprimary (front buffer) m_lpddsback( back buffer). It also supports windowed mode to full screen mode switching. in class destructor i have written a code similar to below one.
  
CDirectXApp::~CDirectXApp()
{
   if( m_lpdd != NULL )
   {
       if( m_lpddsback != NULL )
       {
           m_lpddsback->Release();
           m_lpddsback = NULL;
       }

       if( m_lpddsprimary != NULL )
       {
           m_lpddsprimary->Release();
           m_lpddsprimary = NULL;
       }

      m_lpdd->Release();
      m_lpdd = NULL;
   }
}
  
but on the time destruction i get famous Access Violation 0x000005 error message. i couldn't find the error if any one helps it could be fine... Life is beautiful Edited by - yaskil on July 30, 2001 8:39:15 AM

Share this post


Link to post
Share on other sites
Advertisement
i remember doing that made the same error.
it pops at the second buffer being dispised.

what i did?
i didnt release any,
it should b automatically released when you
release your ddraw object.

Gil

Share this post


Link to post
Share on other sites
Don''t release the back buffer, it gets released when you release the primary surface.

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!