problems about "learning openCV"

The example of the book are a little bit weird for me
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
int main()
{   
  IplImage* image = cvLoadImage("lena.jpg");
   // Create some windows to show the input
    // and output images in.
    //
  cvNamedWindow("Example4-in");
  cvNamedWindow( "Example4-out");
    
  // Create a window to show our input image
  //
  cvShowImage( "Example4-in", image );
  
  // Create an image to hold the smoothed output
  //
  IplImage* out = cvCreateImage(cvGetSize(image), IPL_DEPTH_8U, 3);
  // Do the smoothing
    //
  cvSmooth( image, out, CV_GAUSSIAN, 3, 3 );
  
  // Show the smoothed image in the output window
  //
  cvShowImage( "Example4-out", out );
  
  // Be tidy
  //
  
  cvReleaseImage(&out);
  
  // Wait for the user to hit a key, then clean up the windows
  //
  cvWaitKey( 0 ); 
  cvDestroyWindow( "Example4-in");
  cvDestroyWindow( "Example4-out");

}


The book said the memory would release by themselve
But how about the pointer?
They didn't point it to 0(null)
And this is not the only example which didn't do that
Would the openCV do this for the users too?
Thanks
Topic archived. No new replies allowed.