| 89 | } |
| 90 | |
| 91 | SQWeakRef *SQRefCounted::GetWeakRef(SQObjectType type) |
| 92 | { |
| 93 | if(!_weakref) { |
| 94 | _weakref = (SQWeakRef *)sq_vm_malloc(sizeof(SQWeakRef)); |
| 95 | new (_weakref, sizeof(SQWeakRef)) SQWeakRef(); |
| 96 | _weakref->_obj._type = type; |
| 97 | _weakref->_obj._unVal.pRefCounted = this; |
| 98 | } |
| 99 | return _weakref; |
| 100 | } |
| 101 | |
| 102 | SQRefCounted::~SQRefCounted() |
| 103 | { |
no test coverage detected