본문 바로가기
Overview of Android Memory Management ( 안드로이드의 메모리 관리 ) Overview of Android Memory Management ( 안드로이드의 메모리 관리 ) https://developer.android.com/topic/performance/memory-overview.html -Android Runtime ( ART ) 과 Dalvik 은 paging 과 memory-mapping 을 이용해서 메모리 관리를 한다.app 이 조작하는 메모리는 모두 RAM 에 상주하며 page-out 되지 않는다.이 memory 를 해지하는 방법은 GC 되도록 하는 방법밖에 없다.수정이 발생하지 않는 code 와 같은 녀석들은 RAM 에서 page out 될 수 있다. Garbage collection -Android 의 memory heap 은 세대가 있다(?).예를 들어 .. 2018. 10. 9.
[ruby] download and parse to json [ruby] download and parse to json require "rubygems"require "json"require "net/http"require "uri" uri = URI.parse("http://address") http = Net::HTTP.new(uri.host, uri.port)request = Net::HTTP::Get.new(uri.request_uri) response = http.request(request) if response.code == "200" result = JSON.parse(response.body) result.each do |doc| puts doc["id"] #reference properties like this puts doc # this is.. 2018. 4. 3.
[ios] Gallary ( Photo Album) Permission 체크 [ios] Gallary ( Photo Album) Permission 체크 #import "AssetsLibrary/AssetsLibrary.h" // 권한 체크[ALAssetsLibrary authorizationStatus] > kCLAuthorizationStatusDenied // 권한 요청ALAssetsLibrary *library = [[ALAssetsLibrary alloc] init];[library enumerateGroupsWithTypes:ALAssetsGroupSavedPhotos usingBlock:^(ALAssetsGroup *group, BOOL *stop) { // do something with success *stop = YES;} failureBlock:^(NSErro.. 2018. 2. 3.
[ios tutorial] UIImage RenderingMode ( Template Image ) [ios tutorial] UIImage RenderingMode ( Template Image ) 출처 :https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/UIKitUICatalog/index.html#//apple_ref/doc/uid/TP40012857-UIView-SW7https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIImage_Class/#//apple_ref/c/tdef/UIImageRenderingMode -UIImageRenderingMode 는 3가지 형태가 있다. Automatic AlwaysOriginal Templ.. 2018. 1. 28.
[android] odex 에 대해 알아보자. [android] odex 에 대해 알아보자. -Android 앱은 ZIP 형태로 압축된 apk 에 담겨져 있다.이 apk 파일을 압축해제해보면 classes.dex 라는 파일이 있는데, 이 파일에 code 가 들어 있다.이 파일이 Dalvik JVM 에 의해 parse 가 되고, Dalvik cache 에 저장이 된다. ( /data/dalvik-cache/ 폴더에 저장 )parse & cache save 과정 때문에 최초 실행은 조금 오래 걸릴 수 있는 것이다. -odex 는 classes.dex 의 pre-processed 된 버전이라고 볼 수 있다.즉 Dalvik 이 바로 실행될 수 있는 형태의 dex 라고 보면 된다.앱이 odex 화되면, apk 압축파일에서 classes.dex 는 제거되고, .. 2018. 1. 24.
[Kotlin] Kotlin 의 숨겨진 비용 #1 [Kotlin] Kotlin 의 숨겨진 비용 #1 https://medium.com/@BladeCoder/exploring-kotlins-hidden-costs-part-1-fbb9935d9b62 -“With great power comes great responsibility” 를 기억해야 한다.( 간단한 코드를 짜는 대신 대가가 있다는 얘기다 ) -Kotlin bytecode inspector 를 사용하면 Kotlin 코드가 어떻게 bytecode 로 변환되는지 볼 수 있다.Android studio plugin 으로 접할 수 있다.이를 보면 primitive type 의 boxing, code 에서 보이지 않는 기타 object 들의 instantiation, 그리고 각종 추가 method 들의 추.. 2018. 1. 16.
[iOS Study] UITableViewCell 하위 클래스 만들기 [iOS Study] UITableViewCell 하위 클래스 만들기 출처 : 아론 힐리가스의 iOS 프로그래밍 -UITableView 는 UITableViewCell 객체의 목록을 표시한다.대다수 앱들은 기본 셀과 textLabel, detailTextLabel, imageView 로도 충분하다.하지만 좀 더 자세하거나 다른 레이아웃의 셀이 필요할 땐 UITableViewCell 의 하위 클래스를 만들어야 한다. -UIView 의 하위 클래스를 만들 때, 종종 뷰의 모양을 커스터마이즈하기 위해 drawRect: 메소드를 재정의한다.하지만 UITableViewCell 의 하위 클래스를 만들 떄는 대개 하위뷰들을 셀에 추가하여 모양을 커스터마이즈한다.하위뷰들을 셀에 직접 추가하지 않고 셀의 콘텐트 뷰(co.. 2016. 3. 8.
[android] VideoView 를 사용하는 경우 progress hide timing. [android] VideoView 를 사용하는 경우 progress hide timing. 참조 : https://plus.google.com/+ArneStockmans/posts/FFE8PrWiPyq -API Level 1 부터 사용할 수 있는 VideoView 라는 녀석이 있다.http://developer.android.com/reference/android/widget/VideoView.html -MediaPlayer 의 내용물을 Rendering 시키는 SurfaceView 를 상속한 녀석이다. -SDK 17 부터는 OnInfoListener 를 달아놓으면, 실제 Rendering 이 시작될 때 What 으로 MediaPlayer.MEDIA_INFO_VIDEO_RENDERING_START 가 .. 2015. 12. 10.
Objective-C 의 기본 ( Basic Objective-C ) Object-C 의 기본 ( Basic Objective-C ) 출처 : http://www.tutorialspoint.com/objective_c/ > - OOP 언어로 Smalltalk-style 을 C 언어 에 가미한 언어이다. Apple 의 OSX 와 iOS 에서 공식적으로 사용되는 언어이다. > - Object-C 는 OOP 의 4가지 조건 ( Encapsulation, Data hiding, Inheritance, Polymorphism ) 을 모두 만족시키는 언어이다. - Foundation Framework 는 아래 명시된 기능들을 비롯해 많은 기능을 제공한다. * NSArray, NSDictionary, NSSet 과 같은 data type 을 제공 * file, string 등 많은 u.. 2015. 6. 16.
반응형