mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 04:22:20 +02:00
Internal protection, 'using internal <type or namespace>;`
This commit is contained in:
parent
7349cdf50f
commit
6b27f0f0b2
25 changed files with 313 additions and 96 deletions
|
@ -1411,6 +1411,7 @@ BfMethodInstanceGroup::~BfMethodInstanceGroup()
|
|||
|
||||
BfTypeInstance::~BfTypeInstance()
|
||||
{
|
||||
ReleaseData();
|
||||
delete mTypeInfoEx;
|
||||
delete mGenericTypeInfo;
|
||||
delete mCustomAttributes;
|
||||
|
@ -1423,6 +1424,17 @@ BfTypeInstance::~BfTypeInstance()
|
|||
delete mConstHolder;
|
||||
}
|
||||
|
||||
void BfTypeInstance::ReleaseData()
|
||||
{
|
||||
for (auto& kv : mInternalAccessMap)
|
||||
{
|
||||
auto& internalAcessSet = kv.mValue;
|
||||
for (auto& namespaceComposite : internalAcessSet.mNamespaces)
|
||||
mModule->mSystem->ReleaseAtomComposite(namespaceComposite);
|
||||
}
|
||||
mInternalAccessMap.Clear();
|
||||
}
|
||||
|
||||
int BfTypeInstance::GetSplatCount()
|
||||
{
|
||||
if (IsValuelessType())
|
||||
|
@ -2797,6 +2809,8 @@ int BfResolvedTypeSet::DirectHash(BfTypeReference* typeRef, LookupContext* ctx,
|
|||
|
||||
BfTypeDef* BfResolvedTypeSet::FindRootCommonOuterType(BfTypeDef* outerType, LookupContext* ctx, BfTypeInstance*& outOuterTypeInstance)
|
||||
{
|
||||
if (ctx->mModule->mCurTypeInstance == NULL)
|
||||
return NULL;
|
||||
BfTypeDef* commonOuterType = ctx->mModule->FindCommonOuterType(ctx->mModule->mCurTypeInstance->mTypeDef, outerType);
|
||||
if ((commonOuterType == NULL) && (outerType != NULL))
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue