Home
Sign Up
Sign In
iOS 开发实用技术导航
NSHipster 中文版
›
http://nshipster.cn/
cocos2d 开源 2D 游戏引擎
›
http://www.cocos2d-iphone.org/
CocoaPods
›
http://cocoapods.org/
Google Analytics for Mobile 统计解决方案
›
http://code.google.com/mobile/analytics/
WWDC
›
https://developer.apple.com/wwdc/
Design Guides and Resources
›
https://developer.apple.com/design/
Transcripts of WWDC sessions
›
http://asciiwwdc.com
Cocoa with Love
›
http://cocoawithlove.com/
Cocoa Dev Central
›
http://cocoadevcentral.com/
NSHipster
›
http://nshipster.com/
Style Guides
›
Google Objective-C Style Guide
›
NYTimes Objective-C Style Guide
Useful Tools and Services
›
Charles Web Debugging Proxy
›
Smore
Advertisement
V2EX
›
iDev
print( ) 会导致内存泄露?求解
atuoOo
·
Oct 25, 2015
· 3954 views
This topic created in 4036 days ago, the information mentioned may be changed or developed.
遇到一个很奇怪的现象:
程序很简单,如下:
在 Instruments 的 Leaks 调试:
把 print("test") 注释掉后就没有 leak 了
这是为什么???
print
leaks
leak
求解
7 replies
•
2015-10-26 15:28:09 +08:00
anerevol
Oct 25, 2015 via Android
1
是不是编译器把没有语句的空函数优化掉了
cchange
Oct 26, 2015 via iPhone
2
若是 vc++ 换成 prints ()试试
atuoOo
OP
Oct 26, 2015
3
@
cchange
是在 Xcode 下编译的 Swift
calebx
Oct 26, 2015
4
```
let someStr = "someTest"
print(someStr)
```
这样就可以了?
atuoOo
OP
Oct 26, 2015
5
@
calebx
还是会有。。。重点是为什么?
atuoOo
OP
Oct 26, 2015
6
@
onevcat
还望解答
onevcat
Oct 26, 2015
1
7
新建了个工程试了一下,并没有能重现。也许是你的项目的问题,或者是特定 SDK 、 Xcode 版本或者系统版本的问题?
About
·
Help
·
Advertise
·
Blog
·
API
·
FAQ
·
Privacy
·
Solana
·
2432 Online
Highest 6679
·
Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 32ms ·
UTC 12:19
·
PVG 20:19
·
LAX 04:19
·
JFK 07:19
♥ Do have faith in what you're doing.
❯