mirror of
https://github.com/dromara/tianai-captcha.git
synced 2026-05-07 06:04:34 +08:00
修复资源泄露问题并优化资源管理
- 添加 AutoCloseable 接口实现,支持自动资源释放 - 修复 Graphics2D、ImageOutputStream 等资源未正确关闭的问题 - 为 Spring Bean 添加 destroyMethod 配置 - 添加定时任务线程池的正确关闭逻辑 - FontCache 添加缓存大小限制防止内存泄露 - 优化 StandardWordClickImageCaptchaGenerator 代码结构
This commit is contained in:
+1
-1
@@ -408,7 +408,7 @@ public class CaptchaImageUtils {
|
|||||||
}
|
}
|
||||||
return bufferedImage;
|
return bufferedImage;
|
||||||
} finally {
|
} finally {
|
||||||
// fixme #IDIG16
|
// bugfix #IDIG16
|
||||||
g.dispose();
|
g.dispose();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user