You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
pEpObjCAdapter/pEpObjCAdapter/PEPAutoPointer.m

45 lines
591 B
Matlab

//
// PEPAutoPointer.m
// pEpObjCAdapter
//
// Created by Dirk Zimmermann on 11.04.18.
// Copyright © 2018 pp. All rights reserved.
//
#import "PEPAutoPointer.h"
@interface PEPAutoPointer ()
@property (nonatomic) void *thePointer;
@end
@implementation PEPAutoPointer
- (void **)voidPointerPointer
{
return &_thePointer;
}
- (char **)charPointerPointer
{
return (char **) self.voidPointerPointer;
}
- (void *)voidPointer
{
return self.thePointer;
}
- (char *)charPointer
{
return (char *) self.voidPointer;
}
- (void)dealloc
{
free(_thePointer);
}
@end