i am not allocating new memory for the static combo box, i am just assigning the same address to the static variable, so there is no extra memory allocation. Here's my code:

Qt Code:
  1. sm_pTestCombo = m_pTestCombo;
To copy to clipboard, switch view to plain text mode 

here, sm_pTestCombo is the static member variable and m_pTestCombo is the normal member variable.