我需要能够检查我是否已经在objective-c中释放了一个变量。我尝试检查它是否更改为null:
//Checks if buildview is null and returns respective output
if(BuildView == NULL)
NSLog(@"Build View Value (pointer): Null");
else
NSLog(@"Build View Value (pointer): Not Null");
//allocates memory and initalizes value
BuildV
我有这样一个代码:
public class A: IDisposable
{
public CPlusCode cPlusCode{get;set;}
public void CallB()
{
using(bCode = new B(cPlusCode))
{
//do everything in B
}
}
public void Dispose()
{
cPlusCode.Dispose();
}
}
p
我已经创建了一个com可见的c#动态链接库。我有一个工厂方法来创建对象。我可以在c++上使用和创建对象,但对象似乎没有被释放。我如何解除它们的分配。要使代码清晰,请检查代码
public interface IFoo()
{
void foo();
}
public class A:IFoo
{
//interface implemented here.
}
public interface IClassFactory
{
IFoo create();
}
public class TestFactory:IClassFactory
{
public IFoo creat