lundi 5 novembre 2018

The deletion pointed by a static global pointer

Should I take care of the deletion of static global g_ptr or just let the system does the deletion? (HereDevice is a custom class)

static Device *g_ptr;

void init() {
  ...
  g_ptr = new Device[num_devices];
  ...
}

Aucun commentaire:

Enregistrer un commentaire