[SPCA] MSI section, minor changes

This commit is contained in:
RobinB27
2026-01-24 19:25:09 +01:00
parent ac6c215adf
commit eb6240c26e
5 changed files with 60 additions and 23 deletions

View File

@@ -14,9 +14,12 @@ int main( int argc, char *argv[] ) {
if ( ( arr2 = (long *) realloc( arr2, 15 * sizeof( long ) ) ) == NULL )
return EXIT_FAILURE;
free( arr ); // Deallocate the memory
arr = NULL; // Best practice: NULL pointer
free( arr2 ); // *Can* omit NULLing pointer because end
free( arr ); // Deallocate the memory
arr = NULL; // Best practice: NULL pointer
free( arr2 ); // *Can* omit NULLing pointer because end
long arr3[5]; // Allocate on Stack
// Deallocated automatically when returning
return EXIT_SUCCESS;
}