Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
79a2650d
Commit
79a2650d
authored
Sep 19, 2011
by
Jacek Caban
Committed by
Alexandre Julliard
Sep 19, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vbscript: Store reference to collected object in collect_objects.
parent
2de6982f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
13 deletions
+13
-13
vbdisp.c
dlls/vbscript/vbdisp.c
+13
-13
No files found.
dlls/vbscript/vbdisp.c
View file @
79a2650d
...
...
@@ -123,21 +123,21 @@ static HRESULT invoke_variant_prop(vbdisp_t *This, VARIANT *v, WORD flags, DISPP
return
hres
;
}
static
void
run_terminator
(
vbdisp_t
*
This
)
static
BOOL
run_terminator
(
vbdisp_t
*
This
)
{
DISPPARAMS
dp
=
{
0
};
if
(
This
->
terminator_ran
)
return
;
return
TRUE
;
This
->
terminator_ran
=
TRUE
;
if
(
This
->
desc
->
class_terminate_id
)
{
DISPPARAMS
dp
=
{
0
};
This
->
ref
++
;
exec_script
(
This
->
desc
->
ctx
,
This
->
desc
->
funcs
[
This
->
desc
->
class_terminate_id
].
entries
[
VBDISP_CALLGET
],
(
IDispatch
*
)
&
This
->
IDispatchEx_iface
,
&
dp
,
NULL
);
This
->
ref
--
;
}
if
(
!
This
->
desc
->
class_terminate_id
)
return
TRUE
;
This
->
ref
++
;
exec_script
(
This
->
desc
->
ctx
,
This
->
desc
->
funcs
[
This
->
desc
->
class_terminate_id
].
entries
[
VBDISP_CALLGET
],
(
IDispatch
*
)
&
This
->
IDispatchEx_iface
,
&
dp
,
NULL
);
return
!--
This
->
ref
;
}
static
void
clean_props
(
vbdisp_t
*
This
)
...
...
@@ -196,9 +196,7 @@ static ULONG WINAPI DispatchEx_Release(IDispatchEx *iface)
TRACE
(
"(%p) ref=%d
\n
"
,
This
,
ref
);
if
(
!
ref
)
run_terminator
(
This
);
if
(
!
ref
)
{
if
(
!
ref
&&
run_terminator
(
This
))
{
clean_props
(
This
);
list_remove
(
&
This
->
entry
);
heap_free
(
This
);
...
...
@@ -431,8 +429,10 @@ void collect_objects(script_ctx_t *ctx)
run_terminator
(
iter
);
LIST_FOR_EACH_ENTRY_SAFE
(
iter
,
iter2
,
&
ctx
->
objects
,
vbdisp_t
,
entry
)
{
IDispatchEx_AddRef
(
&
iter
->
IDispatchEx_iface
);
clean_props
(
iter
);
iter
->
desc
=
NULL
;
IDispatchEx_Release
(
&
iter
->
IDispatchEx_iface
);
}
}
...
...
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