Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
middleLayer_for_NJ_lite
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
template admin
middleLayer_for_NJ_lite
Commits
7ce080df
Commit
7ce080df
authored
Sep 27, 2022
by
limingzhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: debug 清缓存
parent
aaeb3d81
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
11 deletions
+24
-11
middleLayerBase.ts
assets/middleLayer_for_NJ_lite/script/middleLayerBase.ts
+24
-11
No files found.
assets/middleLayer_for_NJ_lite/script/middleLayerBase.ts
View file @
7ce080df
...
@@ -435,13 +435,33 @@ export abstract class middleLayerBase extends cc.Component {
...
@@ -435,13 +435,33 @@ export abstract class middleLayerBase extends cc.Component {
// this.textureList[3] = this.textureList[7];
// this.textureList[3] = this.textureList[7];
// this.atlasList.length = this.assetList.length = this.nodeList.length = this.textureList.length = 1;
// this.atlasList.length = this.assetList.length = this.nodeList.length = this.textureList.length = 1;
// [ ...this.atlasList, ...this.assetList ].forEach(asset => {
// console.log('asset_uuid: ', asset._uuid);
// console.log('asset: ', asset);
// while (asset?.refCount > 0) {
// asset.decRef();
// }
// // cc.assetManager.releaseAsset(asset);
// // asset.destroy();
// });
[
...
this
.
atlasList
,
...
this
.
assetList
].
forEach
(
asset
=>
{
[
...
this
.
atlasList
,
...
this
.
assetList
].
forEach
(
asset
=>
{
console
.
log
(
'
asset_uuid:
'
,
asset
.
_uuid
);
console
.
log
(
'
asset_uuid:
'
,
asset
.
_uuid
);
console
.
log
(
'
asset:
'
,
asset
);
console
.
log
(
'
asset:
'
,
asset
);
try
{
// asset.decRef();
while
(
asset
?.
refCount
>
0
)
{
while
(
asset
?.
refCount
>
0
)
{
asset
.
decRef
();
asset
.
decRef
();
}
}
cc
.
assetManager
.
releaseAsset
(
asset
);
asset
.
destroy
();
}
catch
(
error
)
{
console
.
log
(
'
try catch error:
'
,
error
);
}
// asset.decRef();
// cc.assetManager.releaseAsset(asset);
// cc.assetManager.releaseAsset(asset);
// asset.destroy();
// asset.destroy();
});
});
...
@@ -462,16 +482,9 @@ export abstract class middleLayerBase extends cc.Component {
...
@@ -462,16 +482,9 @@ export abstract class middleLayerBase extends cc.Component {
this
.
atlasList
.
length
=
this
.
assetList
.
length
=
this
.
nodeList
.
length
=
this
.
textureList
.
length
=
1
;
//
this.atlasList.length = this.assetList.length = this.nodeList.length = this.textureList.length = 1;
[
...
this
.
atlasList
,
...
this
.
assetList
].
forEach
(
asset
=>
{
console
.
log
(
'
asset_uuid:
'
,
asset
.
_uuid
);
console
.
log
(
'
asset:
'
,
asset
);
// asset.decRef();
cc
.
assetManager
.
releaseAsset
(
asset
);
// asset.destroy();
});
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment