Name
Name
> 没什么不同吧。。。 defer的话,不管下面逻辑怎样都会执行,相当于try finally 解锁,防止lock后逻辑出错,锁一直被占着 但defer会有性能损耗
> 没什么不同吧。。。 https://mp.weixin.qq.com/s?__biz=MzA4ODg0NDkzOA==&mid=2247487117&idx=1&sn=f16833a6f11e929ba6f1d0bca73e9a02&chksm=9022b168a755387e33f0c31c1ea7b44452b04125b80964883de4ba6ad81a097d3c5211e36709&scene=126&sessionid=1585665601&key=5ad99c85beba54493778e510614e9215cde3928ea95bfc6f5c0fdb2ad4d6304efbce1e1ca00e17264052b9f8d7c040260fe9bd7221c2af432694540918c7c64c43ccb66e60527fcae9ce328e898f09f5&ascene=1&uin=MTAzNjg2OTM2MQ%3D%3D&devicetype=Windows+10&version=62080079&lang=zh_CN&exportkey=AWqYJ%2FXom3cDgNQVLaUqf7M%3D&pass_ticket=S5jTvgPK9dIL3iw0fZ7axO6trE0iVPrbxWp4oF5al3PgbcbuPr262qWV%2B7lqrCcY
> 这三行代码,一共就四种情况 > > 锁住 从 map 中获取 value 成功 用不用 defer 无影响 锁住 从 map 中获取 value 失败 用不用 defer 无影响 未锁住 从 map 中获取 value 成功 推测 lock...
https://gitee.com/mirrors/etcd/blob/main/server/storage/storage.go
https://www.cnblogs.com/luoming1224/p/11174927.html 内存泄露的原因是serveCodec方法for循环 go server.handleRequest(cc, req, sending, wg)有select time.After
I can't reproduce this issue on the conditions you provided
I am not the maintainer of this project, but I believe maintaining an open-source project is a demanding task with little reward. We should maintain patience.
## secureRequestDump test code ```go package recovery import ( "net/http" "net/http/httputil" "strings" "testgolang/gin/bytesconv" "testing" ) func maskHeaders(r *http.Request) string { httpRequest, _ := httputil.DumpRequest(r, false) headers := strings.Split(string(httpRequest), "\r\n") maskAuthorization(headers)...
I've just updated this pull request. Compared to the previous version of the pull request, the code is now more simplified and offers higher performance. Please help review this pull...