clear img obj

This commit is contained in:
Jay
2018-10-11 11:01:34 +08:00
parent 241bd42156
commit dadec96cc0
+4
View File
@@ -97,6 +97,7 @@ func GetOriginImage(c *context.Context) {
defer func() {
buf.Reset()
buf = nil
img = nil
}()
c.Writer.Header().Set("Content-Type", "image/jpeg")
@@ -123,6 +124,7 @@ func GetOriginImage(c *context.Context) {
}
defer func() {
buf = nil
img = nil
}()
c.Writer.Header().Set("Content-Type", "image/jpeg")
@@ -205,6 +207,7 @@ func GetThumbnailImage(c *context.Context) {
defer func() {
buf = nil
breader = nil
img = nil
}()
if genNew {
@@ -243,6 +246,7 @@ func GetThumbnailImage(c *context.Context) {
defer func() {
buf = nil
breader = nil
img = nil
}()
savep := path.Join(conf.ImageRoot, "thumbnail", fname)