lot of temp magick files created in temporary folder
<p>I am using the <a href="https://github.com/gographics/imagick" rel="nofollow">imagick </a> library to resizing and cropping the images in a http handler. Which doesn't write anything in <code>/tmp</code> folder. But as i can a lot of these files are being created in that folder and it's size is growing on a daily basis and currently it's consuming around 90% of partition size. Moreover, i am not able to read their content also. So, why these files are being created and would they be delete after a while or do i need to manually delete them. </p>

<pre><code>    -rw------- 1 ubuntu ubuntu   16M Feb 22 09:46 magick-d6ascKJV
    -rw------- 1 ubuntu ubuntu   16M Feb 22 09:46 magick-46ccZIfq
    -rw------- 1 ubuntu ubuntu  1.8M Feb 22 09:47 magick-vUET7vyh
    -rw------- 1 ubuntu ubuntu  1.8M Feb 22 09:47 magick-OLkGWTX8
    -rw------- 1 ubuntu ubuntu   15M Feb 22 09:48 magick-LNMV7YvE
    -rw------- 1 ubuntu ubuntu   16M Feb 22 09:49 magick-0LMYt6Kc
    -rw------- 1 ubuntu ubuntu   16M Feb 22 09:50 magick-ceNxX5CY
    -rw------- 1 ubuntu ubuntu   16M Feb 22 09:50 magick-nQ1M3y6I
</code></pre>

<p><strong>Edit :</strong></p>

<p>I am not using the following two lines in my http Handler. Reason being i couldn't find any explanation to do so. Moreover, the go http handler works fine. So, what is the purpose of these statements?   </p>

<pre><code>imagick.Initialize() 
defer imagick.Terminate()
</code></pre>

<p>I am assuming there would be some reason to include them in the code. So, in go http handler. Where it should be included inside <code>func main()</code> or inside <code>serveHTTP</code> ?</p>

<pre><code>func main() {                                           
    myMux := http.NewServeMux()
    myMux.HandleFunc("/", serveHTTP)

    if err := http.ListenAndServe(":8085", myMux); err != nil {
        logFatal("Error when starting or running http server: %v", err)
    }       

}

func serveHTTP(w http.ResponseWriter, r *http.Request) {

}
</code></pre>