# Does SDL\_QuitSubSystem free the active surface?

**URL:** <https://discourse.libsdl.org/t/does-sdl-quitsubsystem-free-the-active-surface/3521>\
**Category:** SDL Development\
**Created:** [November 22, 2000, 4:36pm UTC](https://discourse.libsdl.org/t/does-sdl-quitsubsystem-free-the-active-surface/3521 "2000-11-22T16:36:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Derethor](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/d/b4bc9f/32.png) [@Derethor](https://discourse.libsdl.org/u/Derethor)\
**Post date:** [November 22, 2000, 4:36pm UTC](https://discourse.libsdl.org/t/does-sdl-quitsubsystem-free-the-active-surface/3521/1 "2000-11-22T16:36:16Z")

</div>

If I create a new surface, via SDL\_SetVideoMode, how can I copy the  
contents of the previus surface to the new one?

AFAIK, the only way to undisplay a surface is via “SDL\_QuitSubSystem”,  
but after it, If I copy the old scren to the new one, I have a  
segmentation fault (I lock the dest surface, ofcoz!)

But, If I load a BMP to the new surface, it works without problems…

So, I assume that SDL\_QuitSubSystem is freeing the old surface… am I  
right?

A possilbe solution is to backup the old screen surface…

Thanks!–  
signed  
derethor of centolos

---

<div class="post-metadata">

**Author:** ![slouken](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/s/ec9cab/32.png) [@slouken](https://discourse.libsdl.org/u/slouken)\
**Post date:** [November 23, 2000, 2:31am UTC](https://discourse.libsdl.org/t/does-sdl-quitsubsystem-free-the-active-surface/3521/2 "2000-11-23T02:31:34Z")

</div>

> So, I assume that SDL\_QuitSubSystem is freeing the old surface… am I  
> right?

Yup.

> A possilbe solution is to backup the old screen surface…

Yup.

See ya! (online in Alaska!)

```
-Sam Lantinga, Lead Programmer, Loki Entertainment Software

```

---

<div class="post-metadata">

**Author:** ![Martin\_Donlon](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/m/919ad9/32.png) [@Martin\_Donlon](https://discourse.libsdl.org/u/Martin_Donlon)\
**Post date:** [November 23, 2000, 4:10am UTC](https://discourse.libsdl.org/t/does-sdl-quitsubsystem-free-the-active-surface/3521/3 "2000-11-23T04:10:12Z")

</div>

Dear oh dearOn Wed, Nov 22, 2000 at 06:31:34PM -0800, Sam Lantinga wrote:

> See ya! (online in Alaska!)  
> –  
> Martin  
> –  
> Bother said the Moderator, &$&^%NO CARRIER
