| Directory: | ./ |
|---|---|
| File: | submodules/ECS/source/component_destructor.c |
| Date: | 2023-09-29 04:53:15 |
| Exec | Total | Coverage | |
|---|---|---|---|
| Lines: | 0 | 4 | 0.0% |
| Branches: | 0 | 2 | 0.0% |
| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | /* | ||
| 2 | * Filename: | ||
| 3 | * source/component_destructor.c | ||
| 4 | * Path: source | ||
| 5 | * Created Date: Sunday, February 12th 2023, 5:21:14 pm | ||
| 6 | * Author: Thomas | ||
| 7 | * | ||
| 8 | * Copyright (c) 2023 Your Company | ||
| 9 | */ | ||
| 10 | |||
| 11 | #include "component.h" | ||
| 12 | #include "world_logger.h" | ||
| 13 | #include <stdlib.h> | ||
| 14 | |||
| 15 | ✗ | void component_destructor(component_t *c) | |
| 16 | { | ||
| 17 | ✗ | if (c->data) | |
| 18 | ✗ | free(c->data); | |
| 19 | ✗ | c->data = 0; | |
| 20 | } | ||
| 21 |