Libraryless. Click here for Pure Java version (41L/1K).
1 | sS getAndClearStringBuffer(StringBuffer buf) {
|
2 | if (buf == null) null; |
3 | synchronized(buf) {
|
4 | S s = buf.toString(); |
5 | clearStringBuffer(buf); |
6 | ret s; |
7 | } |
8 | } |
Began life as a copy of #1016735
download show line numbers debug dex old transpilations
Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv
No comments. add comment
| Snippet ID: | #1029048 |
| Snippet name: | getAndClearStringBuffer - atomic. also releases memory |
| Eternal ID of this version: | #1029048/1 |
| Text MD5: | dac68861da5a8ada5c5ab376a71104fd |
| Transpilation MD5: | 8326be0cf4cff6282e1ebbc75db0266b |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2020-07-17 18:04:49 |
| Source code size: | 171 bytes / 8 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 859 / 1094 |
| Referenced in: | [show references] |