clear img obj
This commit is contained in:
parent
241bd42156
commit
dadec96cc0
@ -97,6 +97,7 @@ func GetOriginImage(c *context.Context) {
|
|||||||
defer func() {
|
defer func() {
|
||||||
buf.Reset()
|
buf.Reset()
|
||||||
buf = nil
|
buf = nil
|
||||||
|
img = nil
|
||||||
}()
|
}()
|
||||||
|
|
||||||
c.Writer.Header().Set("Content-Type", "image/jpeg")
|
c.Writer.Header().Set("Content-Type", "image/jpeg")
|
||||||
@ -123,6 +124,7 @@ func GetOriginImage(c *context.Context) {
|
|||||||
}
|
}
|
||||||
defer func() {
|
defer func() {
|
||||||
buf = nil
|
buf = nil
|
||||||
|
img = nil
|
||||||
}()
|
}()
|
||||||
|
|
||||||
c.Writer.Header().Set("Content-Type", "image/jpeg")
|
c.Writer.Header().Set("Content-Type", "image/jpeg")
|
||||||
@ -205,6 +207,7 @@ func GetThumbnailImage(c *context.Context) {
|
|||||||
defer func() {
|
defer func() {
|
||||||
buf = nil
|
buf = nil
|
||||||
breader = nil
|
breader = nil
|
||||||
|
img = nil
|
||||||
}()
|
}()
|
||||||
|
|
||||||
if genNew {
|
if genNew {
|
||||||
@ -243,6 +246,7 @@ func GetThumbnailImage(c *context.Context) {
|
|||||||
defer func() {
|
defer func() {
|
||||||
buf = nil
|
buf = nil
|
||||||
breader = nil
|
breader = nil
|
||||||
|
img = nil
|
||||||
}()
|
}()
|
||||||
|
|
||||||
savep := path.Join(conf.ImageRoot, "thumbnail", fname)
|
savep := path.Join(conf.ImageRoot, "thumbnail", fname)
|
||||||
|
Loading…
Reference in New Issue
Block a user