macOS/iOS API解説

iOS , Mac アプリケーション開発のために使われる主要フレームワークの日本語情報です。2010年代に書かれた内容です。今後更新はありません。

目次

NSCopyMemoryPages

メモリーブロックをコピーします
void  NSCopyMemoryPages ( 
       const void *   source , 
       void *   destination , 
       unsigned int    byteCount );

解説

メモリーブロックをコピーします。

返り値

引数

( const void * )source
( void * )destination
( unsigned int  )byteCount

クラス

NSCopyMemoryPages

Function

使用可能

10.0

参照

NSAllocateMemoryPages
NSDeallocateMemoryPages

例文

#import "MyObject.h"

@implementation MyObject

- (IBAction)myAction:(id)sender
{
  
    NSRect source = NSMakeRect(1.2,3.4,5.6,7.8);
    NSRect destination;

  NSCopyMemoryPages(&source, &destination, sizeof(NSRect));
 
  
  NSLog(@"%.1f,%.1f,%.1f,%.1f",destination.origin.x,destination.origin.y,
                              destination.size.width,destination.size.height);
}

@end