As the question title implies, if I have some static constant. Let's say a large number of static arrays and I need to determine which static array to use I can do so by checking some conditions and returning a pointer to the static array that is needed.
However, if I store
(type) * (name) = (static array)
If by "static array" you mean you declared
static int x; somewhere, and your function is returning a pointer to the first element of
x (e.g. function
int *foo ends with
return x;, and you do
int *bar = foo();), no, you definitely don't want to
delete that pointer; it wasn't allocated from the heap with
new, so it must not be
delete only deals with heap memory.