Is there a limited number of Window Created ?

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • Is there a limited number of Window Created ?

      Hi there !

      I'm currently working on a project in which we create and delete windows on the fly (using WM_CreateWindow / WM_DeleteWindow).

      We are near project's end so i've made a loop to test robustness of our code.

      It appears that the 6823th time we call WM_CreateWindow this function return "0"... I let you imagine things not going well after that :D

      Of course I tried to differents loops etc but, every time, the 6823th call return "0".

      Any ideas ?

    • Hi,

      In general there is no limitation. The RAM limits the number of windows present at the same time. Since you delete the created windows you should be able to coninue this infinitely.

      I did a quick test and stopt at ~14k passes of creating and deleting of windows.

      Do you set up some other resources in the window callback?
      Do you make sure that these resources are getting freed properly?

      For example, creating a memory device and not deleting it when the window gets deleted.