JavaScript, Javascript Tips, Programming Languages, Programming, Web Development.
Model, Example:- // Dynamically allocated int with malloc() int* ptr = (int*)malloc(sizeof int); // Assign null to pointer before calling free function. ptr = NULL; // memory leak Example:- // Dynamically allocated int with value 6 int* ptr = new int(6); // Assign null to pointer befoer calling