mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-10-24 17:41:17 +00:00
Update app.js
This commit is contained in:
parent
0ab35aab7c
commit
68a57f15fb
7
app.js
7
app.js
|
|
@ -189,10 +189,17 @@ if (typeof CreateObject === "undefined") {
|
|||
|
||||
if (typeof UseObject === "undefined") {
|
||||
var UseObject = function(progId, callback) {
|
||||
var _dispose = function(obj) {
|
||||
try {
|
||||
obj.Close();
|
||||
} catch (e) { /* ignore */ }
|
||||
};
|
||||
|
||||
var obj = CreateObject(progId);
|
||||
try {
|
||||
return callback(obj);
|
||||
} finally {
|
||||
_dispose(obj);
|
||||
obj = null;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user