Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
gmsh
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Larry Price
gmsh
Commits
749e1550
Commit
749e1550
authored
20 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
fixed memory leak introduced when I added support for curved elements
parent
ba55ac39
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
Common/Views.cpp
+25
-22
25 additions, 22 deletions
Common/Views.cpp
with
25 additions
and
22 deletions
Common/Views.cpp
+
25
−
22
View file @
749e1550
// $Id: Views.cpp,v 1.17
3
2005-04-06 1
6:30:52
geuzaine Exp $
// $Id: Views.cpp,v 1.17
4
2005-04-06 1
9:03:01
geuzaine Exp $
//
//
// Copyright (C) 1997-2005 C. Geuzaine, J.-F. Remacle
// Copyright (C) 1997-2005 C. Geuzaine, J.-F. Remacle
//
//
...
@@ -345,6 +345,7 @@ void EndView(Post_View * v, int add_in_gui, char *file_name, char *name)
...
@@ -345,6 +345,7 @@ void EndView(Post_View * v, int add_in_gui, char *file_name, char *name)
Stat_Text
(
v
,
v
->
T3D
,
v
->
T3C
,
5
);
Stat_Text
(
v
,
v
->
T3D
,
v
->
T3C
,
5
);
// convert all curved (geometrically 2nd order) elements into linear
// convert all curved (geometrically 2nd order) elements into linear
// elements *AND* free all the data associated with the curved
// elements
// elements
v
->
splitCurvedElements
();
v
->
splitCurvedElements
();
...
@@ -582,6 +583,7 @@ void FreeView(Post_View * v)
...
@@ -582,6 +583,7 @@ void FreeView(Post_View * v)
List_Delete
(
v
->
SY
);
List_Delete
(
v
->
VY
);
List_Delete
(
v
->
TY
);
List_Delete
(
v
->
SY
);
List_Delete
(
v
->
VY
);
List_Delete
(
v
->
TY
);
List_Delete
(
v
->
T2D
);
List_Delete
(
v
->
T2C
);
List_Delete
(
v
->
T2D
);
List_Delete
(
v
->
T2C
);
List_Delete
(
v
->
T3D
);
List_Delete
(
v
->
T3C
);
List_Delete
(
v
->
T3D
);
List_Delete
(
v
->
T3C
);
// Note: all the second order elements have already been freed in xxxx
if
(
v
->
normals
)
delete
v
->
normals
;
if
(
v
->
normals
)
delete
v
->
normals
;
if
(
v
->
TriVertexArray
)
delete
v
->
TriVertexArray
;
if
(
v
->
TriVertexArray
)
delete
v
->
TriVertexArray
;
if
(
v
->
adaptive
)
delete
v
->
adaptive
;
if
(
v
->
adaptive
)
delete
v
->
adaptive
;
...
@@ -1380,15 +1382,15 @@ void WriteView(Post_View *v, char *filename, int format, int append)
...
@@ -1380,15 +1382,15 @@ void WriteView(Post_View *v, char *filename, int format, int append)
}
}
// Transform curved elements into linear ones
. This is a temporary
// Transform curved elements into linear ones
and delete all the
//
solution, until we can use an Adaptive_Post_View on curved
//
curved element data. This is a temporary solution, until we can use
// elements, too.
//
an Adaptive_Post_View on curved
elements, too.
void
splitCurvedElement
(
List_T
**
in
,
int
*
nbin
,
List_T
*
out
,
int
*
nbout
,
void
splitCurvedElement
(
List_T
**
in
,
int
*
nbin
,
List_T
*
out
,
int
*
nbout
,
int
nodin
,
int
nodout
,
int
nbcomp
,
int
nbsplit
,
int
split
[][
8
],
int
nodin
,
int
nodout
,
int
nbcomp
,
int
nbsplit
,
int
split
[][
8
],
int
remove
=
1
)
int
remove
=
1
)
{
{
if
(
*
nbin
==
0
)
return
;
if
(
*
nbin
){
int
nb
=
List_Nbr
(
*
in
)
/
*
nbin
;
int
nb
=
List_Nbr
(
*
in
)
/
*
nbin
;
int
nbstep
=
(
nb
-
3
*
nodin
)
/
(
nodin
*
nbcomp
);
// we don't know this yet for the view
int
nbstep
=
(
nb
-
3
*
nodin
)
/
(
nodin
*
nbcomp
);
// we don't know this yet for the view
for
(
int
i
=
0
;
i
<
List_Nbr
(
*
in
);
i
+=
nb
)
{
for
(
int
i
=
0
;
i
<
List_Nbr
(
*
in
);
i
+=
nb
)
{
...
@@ -1411,6 +1413,7 @@ void splitCurvedElement(List_T **in, int *nbin, List_T *out, int *nbout,
...
@@ -1411,6 +1413,7 @@ void splitCurvedElement(List_T **in, int *nbin, List_T *out, int *nbout,
(
*
nbout
)
++
;
(
*
nbout
)
++
;
}
}
}
}
}
if
(
remove
){
if
(
remove
){
*
nbin
=
0
;
*
nbin
=
0
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment