Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Z
zmap
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ensembl-gh-mirror
zmap
Commits
29c922b0
Commit
29c922b0
authored
20 years ago
by
edgrif
Browse files
Options
Downloads
Patches
Plain Diff
Fix bug in destroy, g_array_free() seems not to work ??
parent
51652edf
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/zmapGFF/zmapGFF2parser.c
+11
-8
11 additions, 8 deletions
src/zmapGFF/zmapGFF2parser.c
with
11 additions
and
8 deletions
src/zmapGFF/zmapGFF2parser.c
+
11
−
8
View file @
29c922b0
...
...
@@ -26,9 +26,9 @@
*
* Exported functions: See ZMap/zmapGFF.h
* HISTORY:
* Last edited: Ju
n 25
10:
55
2004 (edgrif)
* Last edited: Ju
l 8
10:
28
2004 (edgrif)
* Created: Fri May 28 14:25:12 2004 (edgrif)
* CVS info: $Id: zmapGFF2parser.c,v 1.
5
2004-0
6-25 13
:3
1
:3
2
edgrif Exp $
* CVS info: $Id: zmapGFF2parser.c,v 1.
6
2004-0
7-08 09
:3
5
:3
4
edgrif Exp $
*-------------------------------------------------------------------
*/
...
...
@@ -304,11 +304,8 @@ void zMapGFFDestroyParser(ZMapGFFParser parser)
if
(
parser
->
sequence_name
)
g_free
(
parser
->
sequence_name
)
;
/* Actually this may need more.....if we have allocated arrays they will need to be freed
* maybe....need to think this through.... we should set a destroy function when allocating
* new datalist members....think about our interface here.....we may want to pass our feature
* arrays on to someone....perhaps we need to supply a flag to this routine to decide whether
* to destroy this lot or not.... */
/* The datalist uses a destroy routine that only destroys the feature arrays if the caller wants
* us to, see destroyFeatureArray() */
if
(
!
parser
->
parse_only
&&
parser
->
feature_sets
)
g_datalist_clear
(
&
(
parser
->
feature_sets
))
;
...
...
@@ -1253,8 +1250,14 @@ void destroyFeatureArray(gpointer data)
g_free
(
feature_set
->
source
)
;
/* When I try to get rid of the array but _not_ the data it seems to free the data as well ! */
/* Only free actual array data if caller wants it freed. */
g_array_free
(
feature_set
->
features
,
feature_set
->
parser
->
free_on_destroy
)
;
if
(
feature_set
->
parser
->
free_on_destroy
)
g_array_free
(
feature_set
->
features
,
TRUE
)
;
/* No data to free in this list, just clear it. */
g_datalist_clear
(
&
(
feature_set
->
multiline_features
))
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
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